• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Deprecated APIs
2
3<!--introduced_in=v7.7.0-->
4
5<!-- type=misc -->
6
7Node.js APIs might be deprecated for any of the following reasons:
8
9* Use of the API is unsafe.
10* An improved alternative API is available.
11* Breaking changes to the API are expected in a future major release.
12
13Node.js uses three kinds of Deprecations:
14
15* Documentation-only
16* Runtime
17* End-of-Life
18
19A Documentation-only deprecation is one that is expressed only within the
20Node.js API docs. These generate no side-effects while running Node.js.
21Some Documentation-only deprecations trigger a runtime warning when launched
22with [`--pending-deprecation`][] flag (or its alternative,
23`NODE_PENDING_DEPRECATION=1` environment variable), similarly to Runtime
24deprecations below. Documentation-only deprecations that support that flag
25are explicitly labeled as such in the
26[list of Deprecated APIs](#list-of-deprecated-apis).
27
28A Runtime deprecation will, by default, generate a process warning that will
29be printed to `stderr` the first time the deprecated API is used. When the
30[`--throw-deprecation`][] command-line flag is used, a Runtime deprecation will
31cause an error to be thrown.
32
33An End-of-Life deprecation is used when functionality is or will soon be removed
34from Node.js.
35
36## Revoking deprecations
37
38Occasionally, the deprecation of an API might be reversed. In such situations,
39this document will be updated with information relevant to the decision.
40However, the deprecation identifier will not be modified.
41
42## List of deprecated APIs
43
44### DEP0001: `http.OutgoingMessage.prototype.flush`
45
46<!-- YAML
47changes:
48  - version: v14.0.0
49    pr-url: https://github.com/nodejs/node/pull/31164
50    description: End-of-Life.
51  - version:
52    - v6.12.0
53    - v4.8.6
54    pr-url: https://github.com/nodejs/node/pull/10116
55    description: A deprecation code has been assigned.
56  - version: v1.6.0
57    pr-url: https://github.com/nodejs/node/pull/1156
58    description: Runtime deprecation.
59-->
60
61Type: End-of-Life
62
63`OutgoingMessage.prototype.flush()` has been removed. Use
64`OutgoingMessage.prototype.flushHeaders()` instead.
65
66### DEP0002: `require('_linklist')`
67
68<!-- YAML
69changes:
70  - version: v8.0.0
71    pr-url: https://github.com/nodejs/node/pull/12113
72    description: End-of-Life.
73  - version: v6.12.0
74    pr-url: https://github.com/nodejs/node/pull/10116
75    description: A deprecation code has been assigned.
76  - version: v5.0.0
77    pr-url: https://github.com/nodejs/node/pull/3078
78    description: Runtime deprecation.
79-->
80
81Type: End-of-Life
82
83The `_linklist` module is deprecated. Please use a userland alternative.
84
85### DEP0003: `_writableState.buffer`
86
87<!-- YAML
88changes:
89  - version: v14.0.0
90    pr-url: https://github.com/nodejs/node/pull/31165
91    description: End-of-Life.
92  - version:
93    - v6.12.0
94    - v4.8.6
95    pr-url: https://github.com/nodejs/node/pull/10116
96    description: A deprecation code has been assigned.
97  - version: v0.11.15
98    pr-url: https://github.com/nodejs/node-v0.x-archive/pull/8826
99    description: Runtime deprecation.
100-->
101
102Type: End-of-Life
103
104The `_writableState.buffer` has been removed. Use `_writableState.getBuffer()`
105instead.
106
107### DEP0004: `CryptoStream.prototype.readyState`
108
109<!-- YAML
110changes:
111  - version: v10.0.0
112    pr-url: https://github.com/nodejs/node/pull/17882
113    description: End-of-Life.
114  - version:
115    - v6.12.0
116    - v4.8.6
117    pr-url: https://github.com/nodejs/node/pull/10116
118    description: A deprecation code has been assigned.
119  - version: v0.4.0
120    commit: 9c7f89bf56abd37a796fea621ad2e47dd33d2b82
121    description: Documentation-only deprecation.
122-->
123
124Type: End-of-Life
125
126The `CryptoStream.prototype.readyState` property was removed.
127
128### DEP0005: `Buffer()` constructor
129
130<!-- YAML
131changes:
132  - version: v10.0.0
133    pr-url: https://github.com/nodejs/node/pull/19524
134    description: Runtime deprecation.
135  - version: v6.12.0
136    pr-url: https://github.com/nodejs/node/pull/10116
137    description: A deprecation code has been assigned.
138  - version: v6.0.0
139    pr-url: https://github.com/nodejs/node/pull/4682
140    description: Documentation-only deprecation.
141-->
142
143Type: Runtime (supports [`--pending-deprecation`][])
144
145The `Buffer()` function and `new Buffer()` constructor are deprecated due to
146API usability issues that can lead to accidental security issues.
147
148As an alternative, use one of the following methods of constructing `Buffer`
149objects:
150
151* [`Buffer.alloc(size[, fill[, encoding]])`][alloc]: Create a `Buffer` with
152  _initialized_ memory.
153* [`Buffer.allocUnsafe(size)`][alloc_unsafe_size]: Create a `Buffer` with
154  _uninitialized_ memory.
155* [`Buffer.allocUnsafeSlow(size)`][]: Create a `Buffer` with _uninitialized_
156  memory.
157* [`Buffer.from(array)`][]: Create a `Buffer` with a copy of `array`
158* [`Buffer.from(arrayBuffer[, byteOffset[, length]])`][from_arraybuffer] -
159  Create a `Buffer` that wraps the given `arrayBuffer`.
160* [`Buffer.from(buffer)`][]: Create a `Buffer` that copies `buffer`.
161* [`Buffer.from(string[, encoding])`][from_string_encoding]: Create a `Buffer`
162  that copies `string`.
163
164Without `--pending-deprecation`, runtime warnings occur only for code not in
165`node_modules`. This means there will not be deprecation warnings for
166`Buffer()` usage in dependencies. With `--pending-deprecation`, a runtime
167warning results no matter where the `Buffer()` usage occurs.
168
169### DEP0006: `child_process` `options.customFds`
170
171<!-- YAML
172changes:
173  - version: v12.0.0
174    pr-url: https://github.com/nodejs/node/pull/25279
175    description: End-of-Life.
176  - version:
177    - v6.12.0
178    - v4.8.6
179    pr-url: https://github.com/nodejs/node/pull/10116
180    description: A deprecation code has been assigned.
181  - version: v0.11.14
182    description: Runtime deprecation.
183  - version: v0.5.10
184    description: Documentation-only deprecation.
185-->
186
187Type: End-of-Life
188
189Within the [`child_process`][] module's `spawn()`, `fork()`, and `exec()`
190methods, the `options.customFds` option is deprecated. The `options.stdio`
191option should be used instead.
192
193### DEP0007: Replace `cluster` `worker.suicide` with `worker.exitedAfterDisconnect`
194
195<!-- YAML
196changes:
197  - version: v9.0.0
198    pr-url: https://github.com/nodejs/node/pull/13702
199    description: End-of-Life.
200  - version: v7.0.0
201    pr-url: https://github.com/nodejs/node/pull/3747
202    description: Runtime deprecation.
203  - version: v6.12.0
204    pr-url: https://github.com/nodejs/node/pull/10116
205    description: A deprecation code has been assigned.
206  - version: v6.0.0
207    pr-url: https://github.com/nodejs/node/pull/3743
208    description: Documentation-only deprecation.
209-->
210
211Type: End-of-Life
212
213In an earlier version of the Node.js `cluster`, a boolean property with the name
214`suicide` was added to the `Worker` object. The intent of this property was to
215provide an indication of how and why the `Worker` instance exited. In Node.js
2166.0.0, the old property was deprecated and replaced with a new
217[`worker.exitedAfterDisconnect`][] property. The old property name did not
218precisely describe the actual semantics and was unnecessarily emotion-laden.
219
220### DEP0008: `require('node:constants')`
221
222<!-- YAML
223changes:
224  - version: v6.12.0
225    pr-url: https://github.com/nodejs/node/pull/10116
226    description: A deprecation code has been assigned.
227  - version: v6.3.0
228    pr-url: https://github.com/nodejs/node/pull/6534
229    description: Documentation-only deprecation.
230-->
231
232Type: Documentation-only
233
234The `node:constants` module is deprecated. When requiring access to constants
235relevant to specific Node.js builtin modules, developers should instead refer
236to the `constants` property exposed by the relevant module. For instance,
237`require('node:fs').constants` and `require('node:os').constants`.
238
239### DEP0009: `crypto.pbkdf2` without digest
240
241<!-- YAML
242changes:
243  - version: v14.0.0
244    pr-url: https://github.com/nodejs/node/pull/31166
245    description: End-of-Life (for `digest === null`).
246  - version: v11.0.0
247    pr-url: https://github.com/nodejs/node/pull/22861
248    description: Runtime deprecation (for `digest === null`).
249  - version: v8.0.0
250    pr-url: https://github.com/nodejs/node/pull/11305
251    description: End-of-Life (for `digest === undefined`).
252  - version: v6.12.0
253    pr-url: https://github.com/nodejs/node/pull/10116
254    description: A deprecation code has been assigned.
255  - version: v6.0.0
256    pr-url: https://github.com/nodejs/node/pull/4047
257    description: Runtime deprecation (for `digest === undefined`).
258-->
259
260Type: End-of-Life
261
262Use of the [`crypto.pbkdf2()`][] API without specifying a digest was deprecated
263in Node.js 6.0 because the method defaulted to using the non-recommended
264`'SHA1'` digest. Previously, a deprecation warning was printed. Starting in
265Node.js 8.0.0, calling `crypto.pbkdf2()` or `crypto.pbkdf2Sync()` with
266`digest` set to `undefined` will throw a `TypeError`.
267
268Beginning in Node.js v11.0.0, calling these functions with `digest` set to
269`null` would print a deprecation warning to align with the behavior when `digest`
270is `undefined`.
271
272Now, however, passing either `undefined` or `null` will throw a `TypeError`.
273
274### DEP0010: `crypto.createCredentials`
275
276<!-- YAML
277changes:
278  - version: v11.0.0
279    pr-url: https://github.com/nodejs/node/pull/21153
280    description: End-of-Life.
281  - version:
282    - v6.12.0
283    - v4.8.6
284    pr-url: https://github.com/nodejs/node/pull/10116
285    description: A deprecation code has been assigned.
286  - version: v0.11.13
287    pr-url: https://github.com/nodejs/node-v0.x-archive/pull/7265
288    description: Runtime deprecation.
289-->
290
291Type: End-of-Life
292
293The `crypto.createCredentials()` API was removed. Please use
294[`tls.createSecureContext()`][] instead.
295
296### DEP0011: `crypto.Credentials`
297
298<!-- YAML
299changes:
300  - version: v11.0.0
301    pr-url: https://github.com/nodejs/node/pull/21153
302    description: End-of-Life.
303  - version:
304    - v6.12.0
305    - v4.8.6
306    pr-url: https://github.com/nodejs/node/pull/10116
307    description: A deprecation code has been assigned.
308  - version: v0.11.13
309    pr-url: https://github.com/nodejs/node-v0.x-archive/pull/7265
310    description: Runtime deprecation.
311-->
312
313Type: End-of-Life
314
315The `crypto.Credentials` class was removed. Please use [`tls.SecureContext`][]
316instead.
317
318### DEP0012: `Domain.dispose`
319
320<!-- YAML
321changes:
322  - version: v9.0.0
323    pr-url: https://github.com/nodejs/node/pull/15412
324    description: End-of-Life.
325  - version:
326    - v6.12.0
327    - v4.8.6
328    pr-url: https://github.com/nodejs/node/pull/10116
329    description: A deprecation code has been assigned.
330  - version: v0.11.7
331    pr-url: https://github.com/nodejs/node-v0.x-archive/pull/5021
332    description: Runtime deprecation.
333-->
334
335Type: End-of-Life
336
337`Domain.dispose()` has been removed. Recover from failed I/O actions
338explicitly via error event handlers set on the domain instead.
339
340### DEP0013: `fs` asynchronous function without callback
341
342<!-- YAML
343changes:
344  - version: v10.0.0
345    pr-url: https://github.com/nodejs/node/pull/18668
346    description: End-of-Life.
347  - version: v7.0.0
348    pr-url: https://github.com/nodejs/node/pull/7897
349    description: Runtime deprecation.
350-->
351
352Type: End-of-Life
353
354Calling an asynchronous function without a callback throws a `TypeError`
355in Node.js 10.0.0 onwards. See <https://github.com/nodejs/node/pull/12562>.
356
357### DEP0014: `fs.read` legacy String interface
358
359<!-- YAML
360changes:
361  - version: v8.0.0
362    pr-url: https://github.com/nodejs/node/pull/9683
363    description: End-of-Life.
364  - version:
365    - v6.12.0
366    - v4.8.6
367    pr-url: https://github.com/nodejs/node/pull/10116
368    description: A deprecation code has been assigned.
369  - version: v6.0.0
370    pr-url: https://github.com/nodejs/node/pull/4525
371    description: Runtime deprecation.
372  - version: v0.1.96
373    commit: c93e0aaf062081db3ec40ac45b3e2c979d5759d6
374    description: Documentation-only deprecation.
375-->
376
377Type: End-of-Life
378
379The [`fs.read()`][] legacy `String` interface is deprecated. Use the `Buffer`
380API as mentioned in the documentation instead.
381
382### DEP0015: `fs.readSync` legacy String interface
383
384<!-- YAML
385changes:
386  - version: v8.0.0
387    pr-url: https://github.com/nodejs/node/pull/9683
388    description: End-of-Life.
389  - version:
390    - v6.12.0
391    - v4.8.6
392    pr-url: https://github.com/nodejs/node/pull/10116
393    description: A deprecation code has been assigned.
394  - version: v6.0.0
395    pr-url: https://github.com/nodejs/node/pull/4525
396    description: Runtime deprecation.
397  - version: v0.1.96
398    commit: c93e0aaf062081db3ec40ac45b3e2c979d5759d6
399    description: Documentation-only deprecation.
400-->
401
402Type: End-of-Life
403
404The [`fs.readSync()`][] legacy `String` interface is deprecated. Use the
405`Buffer` API as mentioned in the documentation instead.
406
407### DEP0016: `GLOBAL`/`root`
408
409<!-- YAML
410changes:
411  - version: v14.0.0
412    pr-url: https://github.com/nodejs/node/pull/31167
413    description: End-of-Life.
414  - version: v6.12.0
415    pr-url: https://github.com/nodejs/node/pull/10116
416    description: A deprecation code has been assigned.
417  - version: v6.0.0
418    pr-url: https://github.com/nodejs/node/pull/1838
419    description: Runtime deprecation.
420-->
421
422Type: End-of-Life
423
424The `GLOBAL` and `root` aliases for the `global` property were deprecated
425in Node.js 6.0.0 and have since been removed.
426
427### DEP0017: `Intl.v8BreakIterator`
428
429<!-- YAML
430changes:
431  - version: v9.0.0
432    pr-url: https://github.com/nodejs/node/pull/15238
433    description: End-of-Life.
434  - version: v7.0.0
435    pr-url: https://github.com/nodejs/node/pull/8908
436    description: Runtime deprecation.
437-->
438
439Type: End-of-Life
440
441`Intl.v8BreakIterator` was a non-standard extension and has been removed.
442See [`Intl.Segmenter`](https://github.com/tc39/proposal-intl-segmenter).
443
444### DEP0018: Unhandled promise rejections
445
446<!-- YAML
447changes:
448  - version: v15.0.0
449    pr-url: https://github.com/nodejs/node/pull/35316
450    description: End-of-Life.
451  - version: v7.0.0
452    pr-url: https://github.com/nodejs/node/pull/8217
453    description: Runtime deprecation.
454-->
455
456Type: End-of-Life
457
458Unhandled promise rejections are deprecated. By default, promise rejections
459that are not handled terminate the Node.js process with a non-zero exit
460code. To change the way Node.js treats unhandled rejections, use the
461[`--unhandled-rejections`][] command-line option.
462
463### DEP0019: `require('.')` resolved outside directory
464
465<!-- YAML
466changes:
467  - version: v12.0.0
468    pr-url: https://github.com/nodejs/node/pull/26973
469    description: Removed functionality.
470  - version:
471    - v6.12.0
472    - v4.8.6
473    pr-url: https://github.com/nodejs/node/pull/10116
474    description: A deprecation code has been assigned.
475  - version: v1.8.1
476    pr-url: https://github.com/nodejs/node/pull/1363
477    description: Runtime deprecation.
478-->
479
480Type: End-of-Life
481
482In certain cases, `require('.')` could resolve outside the package directory.
483This behavior has been removed.
484
485### DEP0020: `Server.connections`
486
487<!-- YAML
488changes:
489  - version: v15.0.0
490    pr-url: https://github.com/nodejs/node/pull/33647
491    description: Server.connections has been removed.
492  - version:
493    - v6.12.0
494    - v4.8.6
495    pr-url: https://github.com/nodejs/node/pull/10116
496    description: A deprecation code has been assigned.
497  - version: v0.9.7
498    pr-url: https://github.com/nodejs/node-v0.x-archive/pull/4595
499    description: Runtime deprecation.
500-->
501
502Type: End-of-Life
503
504The `Server.connections` property was deprecated in Node.js v0.9.7 and has
505been removed. Please use the [`Server.getConnections()`][] method instead.
506
507### DEP0021: `Server.listenFD`
508
509<!-- YAML
510changes:
511  - version: v12.0.0
512    pr-url: https://github.com/nodejs/node/pull/27127
513    description: End-of-Life.
514  - version:
515    - v6.12.0
516    - v4.8.6
517    pr-url: https://github.com/nodejs/node/pull/10116
518    description: A deprecation code has been assigned.
519  - version: v0.7.12
520    commit: 41421ff9da1288aa241a5e9dcf915b685ade1c23
521    description: Runtime deprecation.
522-->
523
524Type: End-of-Life
525
526The `Server.listenFD()` method was deprecated and removed. Please use
527[`Server.listen({fd: <number>})`][] instead.
528
529### DEP0022: `os.tmpDir()`
530
531<!-- YAML
532changes:
533  - version: v14.0.0
534    pr-url: https://github.com/nodejs/node/pull/31169
535    description: End-of-Life.
536  - version: v7.0.0
537    pr-url: https://github.com/nodejs/node/pull/6739
538    description: Runtime deprecation.
539-->
540
541Type: End-of-Life
542
543The `os.tmpDir()` API was deprecated in Node.js 7.0.0 and has since been
544removed. Please use [`os.tmpdir()`][] instead.
545
546### DEP0023: `os.getNetworkInterfaces()`
547
548<!-- YAML
549changes:
550  - version: v12.0.0
551    pr-url: https://github.com/nodejs/node/pull/25280
552    description: End-of-Life.
553  - version:
554    - v6.12.0
555    - v4.8.6
556    pr-url: https://github.com/nodejs/node/pull/10116
557    description: A deprecation code has been assigned.
558  - version: v0.6.0
559    commit: 37bb37d151fb6ee4696730e63ff28bb7a4924f97
560    description: Runtime deprecation.
561-->
562
563Type: End-of-Life
564
565The `os.getNetworkInterfaces()` method is deprecated. Please use the
566[`os.networkInterfaces()`][] method instead.
567
568### DEP0024: `REPLServer.prototype.convertToContext()`
569
570<!-- YAML
571changes:
572  - version: v9.0.0
573    pr-url: https://github.com/nodejs/node/pull/13434
574    description: End-of-Life.
575  - version: v7.0.0
576    pr-url: https://github.com/nodejs/node/pull/7829
577    description: Runtime deprecation.
578-->
579
580Type: End-of-Life
581
582The `REPLServer.prototype.convertToContext()` API has been removed.
583
584### DEP0025: `require('node:sys')`
585
586<!-- YAML
587changes:
588  - version:
589    - v6.12.0
590    - v4.8.6
591    pr-url: https://github.com/nodejs/node/pull/10116
592    description: A deprecation code has been assigned.
593  - version: v1.0.0
594    pr-url: https://github.com/nodejs/node/pull/317
595    description: Runtime deprecation.
596-->
597
598Type: Runtime
599
600The `node:sys` module is deprecated. Please use the [`util`][] module instead.
601
602### DEP0026: `util.print()`
603
604<!-- YAML
605changes:
606  - version: v12.0.0
607    pr-url: https://github.com/nodejs/node/pull/25377
608    description: End-of-Life.
609  - version:
610    - v6.12.0
611    - v4.8.6
612    pr-url: https://github.com/nodejs/node/pull/10116
613    description: A deprecation code has been assigned.
614  - version: v0.11.3
615    commit: 896b2aa7074fc886efd7dd0a397d694763cac7ce
616    description: Runtime deprecation.
617-->
618
619Type: End-of-Life
620
621`util.print()` has been removed. Please use [`console.log()`][] instead.
622
623### DEP0027: `util.puts()`
624
625<!-- YAML
626changes:
627  - version: v12.0.0
628    pr-url: https://github.com/nodejs/node/pull/25377
629    description: End-of-Life.
630  - version:
631    - v6.12.0
632    - v4.8.6
633    pr-url: https://github.com/nodejs/node/pull/10116
634    description: A deprecation code has been assigned.
635  - version: v0.11.3
636    commit: 896b2aa7074fc886efd7dd0a397d694763cac7ce
637    description: Runtime deprecation.
638-->
639
640Type: End-of-Life
641
642`util.puts()` has been removed. Please use [`console.log()`][] instead.
643
644### DEP0028: `util.debug()`
645
646<!-- YAML
647changes:
648  - version: v12.0.0
649    pr-url: https://github.com/nodejs/node/pull/25377
650    description: End-of-Life.
651  - version:
652    - v6.12.0
653    - v4.8.6
654    pr-url: https://github.com/nodejs/node/pull/10116
655    description: A deprecation code has been assigned.
656  - version: v0.11.3
657    commit: 896b2aa7074fc886efd7dd0a397d694763cac7ce
658    description: Runtime deprecation.
659-->
660
661Type: End-of-Life
662
663`util.debug()` has been removed. Please use [`console.error()`][] instead.
664
665### DEP0029: `util.error()`
666
667<!-- YAML
668changes:
669  - version: v12.0.0
670    pr-url: https://github.com/nodejs/node/pull/25377
671    description: End-of-Life.
672  - version:
673    - v6.12.0
674    - v4.8.6
675    pr-url: https://github.com/nodejs/node/pull/10116
676    description: A deprecation code has been assigned.
677  - version: v0.11.3
678    commit: 896b2aa7074fc886efd7dd0a397d694763cac7ce
679    description: Runtime deprecation.
680-->
681
682Type: End-of-Life
683
684`util.error()` has been removed. Please use [`console.error()`][] instead.
685
686### DEP0030: `SlowBuffer`
687
688<!-- YAML
689changes:
690  - version: v6.12.0
691    pr-url: https://github.com/nodejs/node/pull/10116
692    description: A deprecation code has been assigned.
693  - version: v6.0.0
694    pr-url: https://github.com/nodejs/node/pull/5833
695    description: Documentation-only deprecation.
696-->
697
698Type: Documentation-only
699
700The [`SlowBuffer`][] class is deprecated. Please use
701[`Buffer.allocUnsafeSlow(size)`][] instead.
702
703### DEP0031: `ecdh.setPublicKey()`
704
705<!-- YAML
706changes:
707  - version: v6.12.0
708    pr-url: https://github.com/nodejs/node/pull/10116
709    description: A deprecation code has been assigned.
710  - version: v5.2.0
711    pr-url: https://github.com/nodejs/node/pull/3511
712    description: Documentation-only deprecation.
713-->
714
715Type: Documentation-only
716
717The [`ecdh.setPublicKey()`][] method is now deprecated as its inclusion in the
718API is not useful.
719
720### DEP0032: `node:domain` module
721
722<!-- YAML
723changes:
724  - version:
725    - v6.12.0
726    - v4.8.6
727    pr-url: https://github.com/nodejs/node/pull/10116
728    description: A deprecation code has been assigned.
729  - version: v1.4.2
730    pr-url: https://github.com/nodejs/node/pull/943
731    description: Documentation-only deprecation.
732-->
733
734Type: Documentation-only
735
736The [`domain`][] module is deprecated and should not be used.
737
738### DEP0033: `EventEmitter.listenerCount()`
739
740<!-- YAML
741changes:
742  - version:
743    - v6.12.0
744    - v4.8.6
745    pr-url: https://github.com/nodejs/node/pull/10116
746    description: A deprecation code has been assigned.
747  - version: v3.2.0
748    pr-url: https://github.com/nodejs/node/pull/2349
749    description: Documentation-only deprecation.
750-->
751
752Type: Documentation-only
753
754The [`events.listenerCount(emitter, eventName)`][] API is
755deprecated. Please use [`emitter.listenerCount(eventName)`][] instead.
756
757### DEP0034: `fs.exists(path, callback)`
758
759<!-- YAML
760changes:
761  - version:
762    - v6.12.0
763    - v4.8.6
764    pr-url: https://github.com/nodejs/node/pull/10116
765    description: A deprecation code has been assigned.
766  - version: v1.0.0
767    pr-url: https://github.com/nodejs/node/pull/166
768    description: Documentation-only deprecation.
769-->
770
771Type: Documentation-only
772
773The [`fs.exists(path, callback)`][] API is deprecated. Please use
774[`fs.stat()`][] or [`fs.access()`][] instead.
775
776### DEP0035: `fs.lchmod(path, mode, callback)`
777
778<!-- YAML
779changes:
780  - version:
781    - v6.12.0
782    - v4.8.6
783    pr-url: https://github.com/nodejs/node/pull/10116
784    description: A deprecation code has been assigned.
785  - version: v0.4.7
786    description: Documentation-only deprecation.
787-->
788
789Type: Documentation-only
790
791The [`fs.lchmod(path, mode, callback)`][] API is deprecated.
792
793### DEP0036: `fs.lchmodSync(path, mode)`
794
795<!-- YAML
796changes:
797  - version:
798    - v6.12.0
799    - v4.8.6
800    pr-url: https://github.com/nodejs/node/pull/10116
801    description: A deprecation code has been assigned.
802  - version: v0.4.7
803    description: Documentation-only deprecation.
804-->
805
806Type: Documentation-only
807
808The [`fs.lchmodSync(path, mode)`][] API is deprecated.
809
810### DEP0037: `fs.lchown(path, uid, gid, callback)`
811
812<!-- YAML
813changes:
814  - version: v10.6.0
815    pr-url: https://github.com/nodejs/node/pull/21498
816    description: Deprecation revoked.
817  - version:
818    - v6.12.0
819    - v4.8.6
820    pr-url: https://github.com/nodejs/node/pull/10116
821    description: A deprecation code has been assigned.
822  - version: v0.4.7
823    description: Documentation-only deprecation.
824-->
825
826Type: Deprecation revoked
827
828The [`fs.lchown(path, uid, gid, callback)`][] API was deprecated. The
829deprecation was revoked because the requisite supporting APIs were added in
830libuv.
831
832### DEP0038: `fs.lchownSync(path, uid, gid)`
833
834<!-- YAML
835changes:
836  - version: v10.6.0
837    pr-url: https://github.com/nodejs/node/pull/21498
838    description: Deprecation revoked.
839  - version:
840    - v6.12.0
841    - v4.8.6
842    pr-url: https://github.com/nodejs/node/pull/10116
843    description: A deprecation code has been assigned.
844  - version: v0.4.7
845    description: Documentation-only deprecation.
846-->
847
848Type: Deprecation revoked
849
850The [`fs.lchownSync(path, uid, gid)`][] API was deprecated. The deprecation was
851revoked because the requisite supporting APIs were added in libuv.
852
853### DEP0039: `require.extensions`
854
855<!-- YAML
856changes:
857  - version:
858    - v6.12.0
859    - v4.8.6
860    pr-url: https://github.com/nodejs/node/pull/10116
861    description: A deprecation code has been assigned.
862  - version: v0.10.6
863    commit: 7bd8a5a2a60b75266f89f9a32877d55294a3881c
864    description: Documentation-only deprecation.
865-->
866
867Type: Documentation-only
868
869The [`require.extensions`][] property is deprecated.
870
871### DEP0040: `node:punycode` module
872
873<!-- YAML
874changes:
875  - version: v16.6.0
876    pr-url: https://github.com/nodejs/node/pull/38444
877    description: Added support for `--pending-deprecation`.
878  - version: v7.0.0
879    pr-url: https://github.com/nodejs/node/pull/7941
880    description: Documentation-only deprecation.
881-->
882
883Type: Documentation-only (supports [`--pending-deprecation`][])
884
885The [`punycode`][] module is deprecated. Please use a userland alternative
886instead.
887
888### DEP0041: `NODE_REPL_HISTORY_FILE` environment variable
889
890<!-- YAML
891changes:
892  - version: v10.0.0
893    pr-url: https://github.com/nodejs/node/pull/13876
894    description: End-of-Life.
895  - version:
896    - v6.12.0
897    - v4.8.6
898    pr-url: https://github.com/nodejs/node/pull/10116
899    description: A deprecation code has been assigned.
900  - version: v3.0.0
901    pr-url: https://github.com/nodejs/node/pull/2224
902    description: Documentation-only deprecation.
903-->
904
905Type: End-of-Life
906
907The `NODE_REPL_HISTORY_FILE` environment variable was removed. Please use
908`NODE_REPL_HISTORY` instead.
909
910### DEP0042: `tls.CryptoStream`
911
912<!-- YAML
913changes:
914  - version: v10.0.0
915    pr-url: https://github.com/nodejs/node/pull/17882
916    description: End-of-Life.
917  - version:
918    - v6.12.0
919    - v4.8.6
920    pr-url: https://github.com/nodejs/node/pull/10116
921    description: A deprecation code has been assigned.
922  - version: v0.11.3
923    commit: af80e7bc6e6f33c582eb1f7d37c7f5bbe9f910f7
924    description: Documentation-only deprecation.
925-->
926
927Type: End-of-Life
928
929The [`tls.CryptoStream`][] class was removed. Please use
930[`tls.TLSSocket`][] instead.
931
932### DEP0043: `tls.SecurePair`
933
934<!-- YAML
935changes:
936  - version: v8.0.0
937    pr-url: https://github.com/nodejs/node/pull/11349
938    description: Runtime deprecation.
939  - version: v6.12.0
940    pr-url: https://github.com/nodejs/node/pull/10116
941    description: A deprecation code has been assigned.
942  - version: v6.0.0
943    pr-url: https://github.com/nodejs/node/pull/6063
944    description: Documentation-only deprecation.
945  - version: v0.11.15
946    pr-url:
947      - https://github.com/nodejs/node-v0.x-archive/pull/8695
948      - https://github.com/nodejs/node-v0.x-archive/pull/8700
949    description: Deprecation revoked.
950  - version: v0.11.3
951    commit: af80e7bc6e6f33c582eb1f7d37c7f5bbe9f910f7
952    description: Runtime deprecation.
953-->
954
955Type: Documentation-only
956
957The [`tls.SecurePair`][] class is deprecated. Please use
958[`tls.TLSSocket`][] instead.
959
960### DEP0044: `util.isArray()`
961
962<!-- YAML
963changes:
964  - version:
965    - v6.12.0
966    - v4.8.6
967    pr-url: https://github.com/nodejs/node/pull/10116
968    description: A deprecation code has been assigned.
969  - version:
970    - v4.0.0
971    - v3.3.1
972    pr-url: https://github.com/nodejs/node/pull/2447
973    description: Documentation-only deprecation.
974-->
975
976Type: Documentation-only
977
978The [`util.isArray()`][] API is deprecated. Please use `Array.isArray()`
979instead.
980
981### DEP0045: `util.isBoolean()`
982
983<!-- YAML
984changes:
985  - version:
986    - v6.12.0
987    - v4.8.6
988    pr-url: https://github.com/nodejs/node/pull/10116
989    description: A deprecation code has been assigned.
990  - version:
991    - v4.0.0
992    - v3.3.1
993    pr-url: https://github.com/nodejs/node/pull/2447
994    description: Documentation-only deprecation.
995-->
996
997Type: Documentation-only
998
999The [`util.isBoolean()`][] API is deprecated.
1000
1001### DEP0046: `util.isBuffer()`
1002
1003<!-- YAML
1004changes:
1005  - version:
1006    - v6.12.0
1007    - v4.8.6
1008    pr-url: https://github.com/nodejs/node/pull/10116
1009    description: A deprecation code has been assigned.
1010  - version:
1011    - v4.0.0
1012    - v3.3.1
1013    pr-url: https://github.com/nodejs/node/pull/2447
1014    description: Documentation-only deprecation.
1015-->
1016
1017Type: Documentation-only
1018
1019The [`util.isBuffer()`][] API is deprecated. Please use
1020[`Buffer.isBuffer()`][] instead.
1021
1022### DEP0047: `util.isDate()`
1023
1024<!-- YAML
1025changes:
1026  - version:
1027    - v6.12.0
1028    - v4.8.6
1029    pr-url: https://github.com/nodejs/node/pull/10116
1030    description: A deprecation code has been assigned.
1031  - version:
1032    - v4.0.0
1033    - v3.3.1
1034    pr-url: https://github.com/nodejs/node/pull/2447
1035    description: Documentation-only deprecation.
1036-->
1037
1038Type: Documentation-only
1039
1040The [`util.isDate()`][] API is deprecated.
1041
1042### DEP0048: `util.isError()`
1043
1044<!-- YAML
1045changes:
1046  - version:
1047    - v6.12.0
1048    - v4.8.6
1049    pr-url: https://github.com/nodejs/node/pull/10116
1050    description: A deprecation code has been assigned.
1051  - version:
1052    - v4.0.0
1053    - v3.3.1
1054    pr-url: https://github.com/nodejs/node/pull/2447
1055    description: Documentation-only deprecation.
1056-->
1057
1058Type: Documentation-only
1059
1060The [`util.isError()`][] API is deprecated.
1061
1062### DEP0049: `util.isFunction()`
1063
1064<!-- YAML
1065changes:
1066  - version:
1067    - v6.12.0
1068    - v4.8.6
1069    pr-url: https://github.com/nodejs/node/pull/10116
1070    description: A deprecation code has been assigned.
1071  - version:
1072    - v4.0.0
1073    - v3.3.1
1074    pr-url: https://github.com/nodejs/node/pull/2447
1075    description: Documentation-only deprecation.
1076-->
1077
1078Type: Documentation-only
1079
1080The [`util.isFunction()`][] API is deprecated.
1081
1082### DEP0050: `util.isNull()`
1083
1084<!-- YAML
1085changes:
1086  - version:
1087    - v6.12.0
1088    - v4.8.6
1089    pr-url: https://github.com/nodejs/node/pull/10116
1090    description: A deprecation code has been assigned.
1091  - version:
1092    - v4.0.0
1093    - v3.3.1
1094    pr-url: https://github.com/nodejs/node/pull/2447
1095    description: Documentation-only deprecation.
1096-->
1097
1098Type: Documentation-only
1099
1100The [`util.isNull()`][] API is deprecated.
1101
1102### DEP0051: `util.isNullOrUndefined()`
1103
1104<!-- YAML
1105changes:
1106  - version:
1107    - v6.12.0
1108    - v4.8.6
1109    pr-url: https://github.com/nodejs/node/pull/10116
1110    description: A deprecation code has been assigned.
1111  - version:
1112    - v4.0.0
1113    - v3.3.1
1114    pr-url: https://github.com/nodejs/node/pull/2447
1115    description: Documentation-only deprecation.
1116-->
1117
1118Type: Documentation-only
1119
1120The [`util.isNullOrUndefined()`][] API is deprecated.
1121
1122### DEP0052: `util.isNumber()`
1123
1124<!-- YAML
1125changes:
1126  - version:
1127    - v6.12.0
1128    - v4.8.6
1129    pr-url: https://github.com/nodejs/node/pull/10116
1130    description: A deprecation code has been assigned.
1131  - version:
1132    - v4.0.0
1133    - v3.3.1
1134    pr-url: https://github.com/nodejs/node/pull/2447
1135    description: Documentation-only deprecation.
1136-->
1137
1138Type: Documentation-only
1139
1140The [`util.isNumber()`][] API is deprecated.
1141
1142### DEP0053: `util.isObject()`
1143
1144<!-- YAML
1145changes:
1146  - version:
1147    - v6.12.0
1148    - v4.8.6
1149    pr-url: https://github.com/nodejs/node/pull/10116
1150    description: A deprecation code has been assigned.
1151  - version:
1152    - v4.0.0
1153    - v3.3.1
1154    pr-url: https://github.com/nodejs/node/pull/2447
1155    description: Documentation-only deprecation.
1156-->
1157
1158Type: Documentation-only
1159
1160The [`util.isObject()`][] API is deprecated.
1161
1162### DEP0054: `util.isPrimitive()`
1163
1164<!-- YAML
1165changes:
1166  - version:
1167    - v6.12.0
1168    - v4.8.6
1169    pr-url: https://github.com/nodejs/node/pull/10116
1170    description: A deprecation code has been assigned.
1171  - version:
1172    - v4.0.0
1173    - v3.3.1
1174    pr-url: https://github.com/nodejs/node/pull/2447
1175    description: Documentation-only deprecation.
1176-->
1177
1178Type: Documentation-only
1179
1180The [`util.isPrimitive()`][] API is deprecated.
1181
1182### DEP0055: `util.isRegExp()`
1183
1184<!-- YAML
1185changes:
1186  - version:
1187    - v6.12.0
1188    - v4.8.6
1189    pr-url: https://github.com/nodejs/node/pull/10116
1190    description: A deprecation code has been assigned.
1191  - version:
1192    - v4.0.0
1193    - v3.3.1
1194    pr-url: https://github.com/nodejs/node/pull/2447
1195    description: Documentation-only deprecation.
1196-->
1197
1198Type: Documentation-only
1199
1200The [`util.isRegExp()`][] API is deprecated.
1201
1202### DEP0056: `util.isString()`
1203
1204<!-- YAML
1205changes:
1206  - version:
1207    - v6.12.0
1208    - v4.8.6
1209    pr-url: https://github.com/nodejs/node/pull/10116
1210    description: A deprecation code has been assigned.
1211  - version:
1212    - v4.0.0
1213    - v3.3.1
1214    pr-url: https://github.com/nodejs/node/pull/2447
1215    description: Documentation-only deprecation.
1216-->
1217
1218Type: Documentation-only
1219
1220The [`util.isString()`][] API is deprecated.
1221
1222### DEP0057: `util.isSymbol()`
1223
1224<!-- YAML
1225changes:
1226  - version:
1227    - v6.12.0
1228    - v4.8.6
1229    pr-url: https://github.com/nodejs/node/pull/10116
1230    description: A deprecation code has been assigned.
1231  - version:
1232    - v4.0.0
1233    - v3.3.1
1234    pr-url: https://github.com/nodejs/node/pull/2447
1235    description: Documentation-only deprecation.
1236-->
1237
1238Type: Documentation-only
1239
1240The [`util.isSymbol()`][] API is deprecated.
1241
1242### DEP0058: `util.isUndefined()`
1243
1244<!-- YAML
1245changes:
1246  - version:
1247    - v6.12.0
1248    - v4.8.6
1249    pr-url: https://github.com/nodejs/node/pull/10116
1250    description: A deprecation code has been assigned.
1251  - version:
1252    - v4.0.0
1253    - v3.3.1
1254    pr-url: https://github.com/nodejs/node/pull/2447
1255    description: Documentation-only deprecation.
1256-->
1257
1258Type: Documentation-only
1259
1260The [`util.isUndefined()`][] API is deprecated.
1261
1262### DEP0059: `util.log()`
1263
1264<!-- YAML
1265changes:
1266  - version: v6.12.0
1267    pr-url: https://github.com/nodejs/node/pull/10116
1268    description: A deprecation code has been assigned.
1269  - version: v6.0.0
1270    pr-url: https://github.com/nodejs/node/pull/6161
1271    description: Documentation-only deprecation.
1272-->
1273
1274Type: Documentation-only
1275
1276The [`util.log()`][] API is deprecated.
1277
1278### DEP0060: `util._extend()`
1279
1280<!-- YAML
1281changes:
1282  - version: v6.12.0
1283    pr-url: https://github.com/nodejs/node/pull/10116
1284    description: A deprecation code has been assigned.
1285  - version: v6.0.0
1286    pr-url: https://github.com/nodejs/node/pull/4903
1287    description: Documentation-only deprecation.
1288-->
1289
1290Type: Documentation-only
1291
1292The [`util._extend()`][] API is deprecated.
1293
1294### DEP0061: `fs.SyncWriteStream`
1295
1296<!-- YAML
1297changes:
1298  - version: v11.0.0
1299    pr-url: https://github.com/nodejs/node/pull/20735
1300    description: End-of-Life.
1301  - version: v8.0.0
1302    pr-url: https://github.com/nodejs/node/pull/10467
1303    description: Runtime deprecation.
1304  - version: v7.0.0
1305    pr-url: https://github.com/nodejs/node/pull/6749
1306    description: Documentation-only deprecation.
1307-->
1308
1309Type: End-of-Life
1310
1311The `fs.SyncWriteStream` class was never intended to be a publicly accessible
1312API and has been removed. No alternative API is available. Please use a userland
1313alternative.
1314
1315### DEP0062: `node --debug`
1316
1317<!-- YAML
1318changes:
1319  - version: v12.0.0
1320    pr-url: https://github.com/nodejs/node/pull/25828
1321    description: End-of-Life.
1322  - version: v8.0.0
1323    pr-url: https://github.com/nodejs/node/pull/10970
1324    description: Runtime deprecation.
1325-->
1326
1327Type: End-of-Life
1328
1329`--debug` activates the legacy V8 debugger interface, which was removed as
1330of V8 5.8. It is replaced by Inspector which is activated with `--inspect`
1331instead.
1332
1333### DEP0063: `ServerResponse.prototype.writeHeader()`
1334
1335<!-- YAML
1336changes:
1337  - version: v8.0.0
1338    pr-url: https://github.com/nodejs/node/pull/11355
1339    description: Documentation-only deprecation.
1340-->
1341
1342Type: Documentation-only
1343
1344The `node:http` module `ServerResponse.prototype.writeHeader()` API is
1345deprecated. Please use `ServerResponse.prototype.writeHead()` instead.
1346
1347The `ServerResponse.prototype.writeHeader()` method was never documented as an
1348officially supported API.
1349
1350### DEP0064: `tls.createSecurePair()`
1351
1352<!-- YAML
1353changes:
1354  - version: v8.0.0
1355    pr-url: https://github.com/nodejs/node/pull/11349
1356    description: Runtime deprecation.
1357  - version: v6.12.0
1358    pr-url: https://github.com/nodejs/node/pull/10116
1359    description: A deprecation code has been assigned.
1360  - version: v6.0.0
1361    pr-url: https://github.com/nodejs/node/pull/6063
1362    description: Documentation-only deprecation.
1363  - version: v0.11.15
1364    pr-url:
1365      - https://github.com/nodejs/node-v0.x-archive/pull/8695
1366      - https://github.com/nodejs/node-v0.x-archive/pull/8700
1367    description: Deprecation revoked.
1368  - version: v0.11.3
1369    commit: af80e7bc6e6f33c582eb1f7d37c7f5bbe9f910f7
1370    description: Runtime deprecation.
1371-->
1372
1373Type: Runtime
1374
1375The `tls.createSecurePair()` API was deprecated in documentation in Node.js
13760.11.3. Users should use `tls.Socket` instead.
1377
1378### DEP0065: `repl.REPL_MODE_MAGIC` and `NODE_REPL_MODE=magic`
1379
1380<!-- YAML
1381changes:
1382  - version: v10.0.0
1383    pr-url: https://github.com/nodejs/node/pull/19187
1384    description: End-of-Life.
1385  - version: v8.0.0
1386    pr-url: https://github.com/nodejs/node/pull/11599
1387    description: Documentation-only deprecation.
1388-->
1389
1390Type: End-of-Life
1391
1392The `node:repl` module's `REPL_MODE_MAGIC` constant, used for `replMode` option,
1393has been removed. Its behavior has been functionally identical to that of
1394`REPL_MODE_SLOPPY` since Node.js 6.0.0, when V8 5.0 was imported. Please use
1395`REPL_MODE_SLOPPY` instead.
1396
1397The `NODE_REPL_MODE` environment variable is used to set the underlying
1398`replMode` of an interactive `node` session. Its value, `magic`, is also
1399removed. Please use `sloppy` instead.
1400
1401### DEP0066: `OutgoingMessage.prototype._headers, OutgoingMessage.prototype._headerNames`
1402
1403<!-- YAML
1404changes:
1405  - version: v12.0.0
1406    pr-url: https://github.com/nodejs/node/pull/24167
1407    description: Runtime deprecation.
1408  - version: v8.0.0
1409    pr-url: https://github.com/nodejs/node/pull/10941
1410    description: Documentation-only deprecation.
1411-->
1412
1413Type: Runtime
1414
1415The `node:http` module `OutgoingMessage.prototype._headers` and
1416`OutgoingMessage.prototype._headerNames` properties are deprecated. Use one of
1417the public methods (e.g. `OutgoingMessage.prototype.getHeader()`,
1418`OutgoingMessage.prototype.getHeaders()`,
1419`OutgoingMessage.prototype.getHeaderNames()`,
1420`OutgoingMessage.prototype.getRawHeaderNames()`,
1421`OutgoingMessage.prototype.hasHeader()`,
1422`OutgoingMessage.prototype.removeHeader()`,
1423`OutgoingMessage.prototype.setHeader()`) for working with outgoing headers.
1424
1425The `OutgoingMessage.prototype._headers` and
1426`OutgoingMessage.prototype._headerNames` properties were never documented as
1427officially supported properties.
1428
1429### DEP0067: `OutgoingMessage.prototype._renderHeaders`
1430
1431<!-- YAML
1432changes:
1433  - version: v8.0.0
1434    pr-url: https://github.com/nodejs/node/pull/10941
1435    description: Documentation-only deprecation.
1436-->
1437
1438Type: Documentation-only
1439
1440The `node:http` module `OutgoingMessage.prototype._renderHeaders()` API is
1441deprecated.
1442
1443The `OutgoingMessage.prototype._renderHeaders` property was never documented as
1444an officially supported API.
1445
1446### DEP0068: `node debug`
1447
1448<!-- YAML
1449changes:
1450  - version: v15.0.0
1451    pr-url: https://github.com/nodejs/node/pull/33648
1452    description: The legacy `node debug` command was removed.
1453  - version: v8.0.0
1454    pr-url: https://github.com/nodejs/node/pull/11441
1455    description: Runtime deprecation.
1456-->
1457
1458Type: End-of-Life
1459
1460`node debug` corresponds to the legacy CLI debugger which has been replaced with
1461a V8-inspector based CLI debugger available through `node inspect`.
1462
1463### DEP0069: `vm.runInDebugContext(string)`
1464
1465<!-- YAML
1466changes:
1467  - version: v10.0.0
1468    pr-url: https://github.com/nodejs/node/pull/13295
1469    description: End-of-Life.
1470  - version: v9.0.0
1471    pr-url: https://github.com/nodejs/node/pull/12815
1472    description: Runtime deprecation.
1473  - version: v8.0.0
1474    pr-url: https://github.com/nodejs/node/pull/12243
1475    description: Documentation-only deprecation.
1476-->
1477
1478Type: End-of-Life
1479
1480DebugContext has been removed in V8 and is not available in Node.js 10+.
1481
1482DebugContext was an experimental API.
1483
1484### DEP0070: `async_hooks.currentId()`
1485
1486<!-- YAML
1487changes:
1488  - version: v9.0.0
1489    pr-url: https://github.com/nodejs/node/pull/14414
1490    description: End-of-Life.
1491  - version: v8.2.0
1492    pr-url: https://github.com/nodejs/node/pull/13490
1493    description: Runtime deprecation.
1494-->
1495
1496Type: End-of-Life
1497
1498`async_hooks.currentId()` was renamed to `async_hooks.executionAsyncId()` for
1499clarity.
1500
1501This change was made while `async_hooks` was an experimental API.
1502
1503### DEP0071: `async_hooks.triggerId()`
1504
1505<!-- YAML
1506changes:
1507  - version: v9.0.0
1508    pr-url: https://github.com/nodejs/node/pull/14414
1509    description: End-of-Life.
1510  - version: v8.2.0
1511    pr-url: https://github.com/nodejs/node/pull/13490
1512    description: Runtime deprecation.
1513-->
1514
1515Type: End-of-Life
1516
1517`async_hooks.triggerId()` was renamed to `async_hooks.triggerAsyncId()` for
1518clarity.
1519
1520This change was made while `async_hooks` was an experimental API.
1521
1522### DEP0072: `async_hooks.AsyncResource.triggerId()`
1523
1524<!-- YAML
1525changes:
1526  - version: v9.0.0
1527    pr-url: https://github.com/nodejs/node/pull/14414
1528    description: End-of-Life.
1529  - version: v8.2.0
1530    pr-url: https://github.com/nodejs/node/pull/13490
1531    description: Runtime deprecation.
1532-->
1533
1534Type: End-of-Life
1535
1536`async_hooks.AsyncResource.triggerId()` was renamed to
1537`async_hooks.AsyncResource.triggerAsyncId()` for clarity.
1538
1539This change was made while `async_hooks` was an experimental API.
1540
1541### DEP0073: Several internal properties of `net.Server`
1542
1543<!-- YAML
1544changes:
1545  - version: v10.0.0
1546    pr-url: https://github.com/nodejs/node/pull/17141
1547    description: End-of-Life.
1548  - version: v9.0.0
1549    pr-url: https://github.com/nodejs/node/pull/14449
1550    description: Runtime deprecation.
1551-->
1552
1553Type: End-of-Life
1554
1555Accessing several internal, undocumented properties of `net.Server` instances
1556with inappropriate names is deprecated.
1557
1558As the original API was undocumented and not generally useful for non-internal
1559code, no replacement API is provided.
1560
1561### DEP0074: `REPLServer.bufferedCommand`
1562
1563<!-- YAML
1564changes:
1565  - version: v15.0.0
1566    pr-url: https://github.com/nodejs/node/pull/33286
1567    description: End-of-Life.
1568  - version: v9.0.0
1569    pr-url: https://github.com/nodejs/node/pull/13687
1570    description: Runtime deprecation.
1571-->
1572
1573Type: End-of-Life
1574
1575The `REPLServer.bufferedCommand` property was deprecated in favor of
1576[`REPLServer.clearBufferedCommand()`][].
1577
1578### DEP0075: `REPLServer.parseREPLKeyword()`
1579
1580<!-- YAML
1581changes:
1582  - version: v15.0.0
1583    pr-url: https://github.com/nodejs/node/pull/33286
1584    description: End-of-Life.
1585  - version: v9.0.0
1586    pr-url: https://github.com/nodejs/node/pull/14223
1587    description: Runtime deprecation.
1588-->
1589
1590Type: End-of-Life
1591
1592`REPLServer.parseREPLKeyword()` was removed from userland visibility.
1593
1594### DEP0076: `tls.parseCertString()`
1595
1596<!-- YAML
1597changes:
1598  - version: v18.0.0
1599    pr-url: https://github.com/nodejs/node/pull/41479
1600    description: End-of-Life.
1601  - version: v9.0.0
1602    pr-url: https://github.com/nodejs/node/pull/14249
1603    description: Runtime deprecation.
1604  - version: v8.6.0
1605    pr-url: https://github.com/nodejs/node/pull/14245
1606    description: Documentation-only deprecation.
1607-->
1608
1609Type: End-of-Life
1610
1611`tls.parseCertString()` was a trivial parsing helper that was made public by
1612mistake. While it was supposed to parse certificate subject and issuer strings,
1613it never handled multi-value Relative Distinguished Names correctly.
1614
1615Earlier versions of this document suggested using `querystring.parse()` as an
1616alternative to `tls.parseCertString()`. However, `querystring.parse()` also does
1617not handle all certificate subjects correctly and should not be used.
1618
1619### DEP0077: `Module._debug()`
1620
1621<!-- YAML
1622changes:
1623  - version: v9.0.0
1624    pr-url: https://github.com/nodejs/node/pull/13948
1625    description: Runtime deprecation.
1626-->
1627
1628Type: Runtime
1629
1630`Module._debug()` is deprecated.
1631
1632The `Module._debug()` function was never documented as an officially
1633supported API.
1634
1635### DEP0078: `REPLServer.turnOffEditorMode()`
1636
1637<!-- YAML
1638changes:
1639  - version: v15.0.0
1640    pr-url: https://github.com/nodejs/node/pull/33286
1641    description: End-of-Life.
1642  - version: v9.0.0
1643    pr-url: https://github.com/nodejs/node/pull/15136
1644    description: Runtime deprecation.
1645-->
1646
1647Type: End-of-Life
1648
1649`REPLServer.turnOffEditorMode()` was removed from userland visibility.
1650
1651### DEP0079: Custom inspection function on objects via `.inspect()`
1652
1653<!-- YAML
1654changes:
1655  - version: v11.0.0
1656    pr-url: https://github.com/nodejs/node/pull/20722
1657    description: End-of-Life.
1658  - version: v10.0.0
1659    pr-url: https://github.com/nodejs/node/pull/16393
1660    description: Runtime deprecation.
1661  - version: v8.7.0
1662    pr-url: https://github.com/nodejs/node/pull/15631
1663    description: Documentation-only deprecation.
1664-->
1665
1666Type: End-of-Life
1667
1668Using a property named `inspect` on an object to specify a custom inspection
1669function for [`util.inspect()`][] is deprecated. Use [`util.inspect.custom`][]
1670instead. For backward compatibility with Node.js prior to version 6.4.0, both
1671can be specified.
1672
1673### DEP0080: `path._makeLong()`
1674
1675<!-- YAML
1676changes:
1677  - version: v9.0.0
1678    pr-url: https://github.com/nodejs/node/pull/14956
1679    description: Documentation-only deprecation.
1680-->
1681
1682Type: Documentation-only
1683
1684The internal `path._makeLong()` was not intended for public use. However,
1685userland modules have found it useful. The internal API is deprecated
1686and replaced with an identical, public `path.toNamespacedPath()` method.
1687
1688### DEP0081: `fs.truncate()` using a file descriptor
1689
1690<!-- YAML
1691changes:
1692  - version: v9.0.0
1693    pr-url: https://github.com/nodejs/node/pull/15990
1694    description: Runtime deprecation.
1695-->
1696
1697Type: Runtime
1698
1699`fs.truncate()` `fs.truncateSync()` usage with a file descriptor is
1700deprecated. Please use `fs.ftruncate()` or `fs.ftruncateSync()` to work with
1701file descriptors.
1702
1703### DEP0082: `REPLServer.prototype.memory()`
1704
1705<!-- YAML
1706changes:
1707  - version: v15.0.0
1708    pr-url: https://github.com/nodejs/node/pull/33286
1709    description: End-of-Life.
1710  - version: v9.0.0
1711    pr-url: https://github.com/nodejs/node/pull/16242
1712    description: Runtime deprecation.
1713-->
1714
1715Type: End-of-Life
1716
1717`REPLServer.prototype.memory()` is only necessary for the internal mechanics of
1718the `REPLServer` itself. Do not use this function.
1719
1720### DEP0083: Disabling ECDH by setting `ecdhCurve` to `false`
1721
1722<!-- YAML
1723changes:
1724  - version: v10.0.0
1725    pr-url: https://github.com/nodejs/node/pull/19794
1726    description: End-of-Life.
1727  - version: v9.2.0
1728    pr-url: https://github.com/nodejs/node/pull/16130
1729    description: Runtime deprecation.
1730-->
1731
1732Type: End-of-Life.
1733
1734The `ecdhCurve` option to `tls.createSecureContext()` and `tls.TLSSocket` could
1735be set to `false` to disable ECDH entirely on the server only. This mode was
1736deprecated in preparation for migrating to OpenSSL 1.1.0 and consistency with
1737the client and is now unsupported. Use the `ciphers` parameter instead.
1738
1739### DEP0084: requiring bundled internal dependencies
1740
1741<!-- YAML
1742changes:
1743  - version: v12.0.0
1744    pr-url: https://github.com/nodejs/node/pull/25138
1745    description: This functionality has been removed.
1746  - version: v10.0.0
1747    pr-url: https://github.com/nodejs/node/pull/16392
1748    description: Runtime deprecation.
1749-->
1750
1751Type: End-of-Life
1752
1753Since Node.js versions 4.4.0 and 5.2.0, several modules only intended for
1754internal usage were mistakenly exposed to user code through `require()`. These
1755modules were:
1756
1757* `v8/tools/codemap`
1758* `v8/tools/consarray`
1759* `v8/tools/csvparser`
1760* `v8/tools/logreader`
1761* `v8/tools/profile_view`
1762* `v8/tools/profile`
1763* `v8/tools/SourceMap`
1764* `v8/tools/splaytree`
1765* `v8/tools/tickprocessor-driver`
1766* `v8/tools/tickprocessor`
1767* `node-inspect/lib/_inspect` (from 7.6.0)
1768* `node-inspect/lib/internal/inspect_client` (from 7.6.0)
1769* `node-inspect/lib/internal/inspect_repl` (from 7.6.0)
1770
1771The `v8/*` modules do not have any exports, and if not imported in a specific
1772order would in fact throw errors. As such there are virtually no legitimate use
1773cases for importing them through `require()`.
1774
1775On the other hand, `node-inspect` can be installed locally through a package
1776manager, as it is published on the npm registry under the same name. No source
1777code modification is necessary if that is done.
1778
1779### DEP0085: AsyncHooks sensitive API
1780
1781<!-- YAML
1782changes:
1783  - version: v10.0.0
1784    pr-url: https://github.com/nodejs/node/pull/17147
1785    description: End-of-Life.
1786  - version:
1787    - v9.4.0
1788    - v8.10.0
1789    pr-url: https://github.com/nodejs/node/pull/16972
1790    description: Runtime deprecation.
1791-->
1792
1793Type: End-of-Life
1794
1795The AsyncHooks sensitive API was never documented and had various minor issues.
1796Use the `AsyncResource` API instead. See
1797<https://github.com/nodejs/node/issues/15572>.
1798
1799### DEP0086: Remove `runInAsyncIdScope`
1800
1801<!-- YAML
1802changes:
1803  - version: v10.0.0
1804    pr-url: https://github.com/nodejs/node/pull/17147
1805    description: End-of-Life.
1806  - version:
1807    - v9.4.0
1808    - v8.10.0
1809    pr-url: https://github.com/nodejs/node/pull/16972
1810    description: Runtime deprecation.
1811-->
1812
1813Type: End-of-Life
1814
1815`runInAsyncIdScope` doesn't emit the `'before'` or `'after'` event and can thus
1816cause a lot of issues. See <https://github.com/nodejs/node/issues/14328>.
1817
1818<!-- md-lint skip-deprecation DEP0087 -->
1819
1820<!-- md-lint skip-deprecation DEP0088 -->
1821
1822### DEP0089: `require('node:assert')`
1823
1824<!-- YAML
1825changes:
1826  - version: v12.8.0
1827    pr-url: https://github.com/nodejs/node/pull/28892
1828    description: Deprecation revoked.
1829  - version:
1830      - v9.9.0
1831      - v8.13.0
1832    pr-url: https://github.com/nodejs/node/pull/17002
1833    description: Documentation-only deprecation.
1834-->
1835
1836Type: Deprecation revoked
1837
1838Importing assert directly was not recommended as the exposed functions use
1839loose equality checks. The deprecation was revoked because use of the
1840`node:assert` module is not discouraged, and the deprecation caused developer
1841confusion.
1842
1843### DEP0090: Invalid GCM authentication tag lengths
1844
1845<!-- YAML
1846changes:
1847  - version: v11.0.0
1848    pr-url: https://github.com/nodejs/node/pull/17825
1849    description: End-of-Life.
1850  - version: v10.0.0
1851    pr-url: https://github.com/nodejs/node/pull/18017
1852    description: Runtime deprecation.
1853-->
1854
1855Type: End-of-Life
1856
1857Node.js used to support all GCM authentication tag lengths which are accepted by
1858OpenSSL when calling [`decipher.setAuthTag()`][]. Beginning with Node.js
1859v11.0.0, only authentication tag lengths of 128, 120, 112, 104, 96, 64, and 32
1860bits are allowed. Authentication tags of other lengths are invalid per
1861[NIST SP 800-38D][].
1862
1863### DEP0091: `crypto.DEFAULT_ENCODING`
1864
1865<!-- YAML
1866changes:
1867  - version: v10.0.0
1868    pr-url: https://github.com/nodejs/node/pull/18333
1869    description: Runtime deprecation.
1870-->
1871
1872Type: Runtime
1873
1874The [`crypto.DEFAULT_ENCODING`][] property is deprecated.
1875
1876### DEP0092: Top-level `this` bound to `module.exports`
1877
1878<!-- YAML
1879changes:
1880  - version: v10.0.0
1881    pr-url: https://github.com/nodejs/node/pull/16878
1882    description: Documentation-only deprecation.
1883-->
1884
1885Type: Documentation-only
1886
1887Assigning properties to the top-level `this` as an alternative
1888to `module.exports` is deprecated. Developers should use `exports`
1889or `module.exports` instead.
1890
1891### DEP0093: `crypto.fips` is deprecated and replaced
1892
1893<!-- YAML
1894changes:
1895  - version: v10.0.0
1896    pr-url: https://github.com/nodejs/node/pull/18335
1897    description: Documentation-only deprecation.
1898-->
1899
1900Type: Documentation-only
1901
1902The [`crypto.fips`][] property is deprecated. Please use `crypto.setFips()`
1903and `crypto.getFips()` instead.
1904
1905### DEP0094: Using `assert.fail()` with more than one argument
1906
1907<!-- YAML
1908changes:
1909  - version: v10.0.0
1910    pr-url: https://github.com/nodejs/node/pull/18418
1911    description: Runtime deprecation.
1912-->
1913
1914Type: Runtime
1915
1916Using `assert.fail()` with more than one argument is deprecated. Use
1917`assert.fail()` with only one argument or use a different `node:assert` module
1918method.
1919
1920### DEP0095: `timers.enroll()`
1921
1922<!-- YAML
1923changes:
1924  - version: v10.0.0
1925    pr-url: https://github.com/nodejs/node/pull/18066
1926    description: Runtime deprecation.
1927-->
1928
1929Type: Runtime
1930
1931`timers.enroll()` is deprecated. Please use the publicly documented
1932[`setTimeout()`][] or [`setInterval()`][] instead.
1933
1934### DEP0096: `timers.unenroll()`
1935
1936<!-- YAML
1937changes:
1938  - version: v10.0.0
1939    pr-url: https://github.com/nodejs/node/pull/18066
1940    description: Runtime deprecation.
1941-->
1942
1943Type: Runtime
1944
1945`timers.unenroll()` is deprecated. Please use the publicly documented
1946[`clearTimeout()`][] or [`clearInterval()`][] instead.
1947
1948### DEP0097: `MakeCallback` with `domain` property
1949
1950<!-- YAML
1951changes:
1952  - version: v10.0.0
1953    pr-url: https://github.com/nodejs/node/pull/17417
1954    description: Runtime deprecation.
1955-->
1956
1957Type: Runtime
1958
1959Users of `MakeCallback` that add the `domain` property to carry context,
1960should start using the `async_context` variant of `MakeCallback` or
1961`CallbackScope`, or the high-level `AsyncResource` class.
1962
1963### DEP0098: AsyncHooks embedder `AsyncResource.emitBefore` and `AsyncResource.emitAfter` APIs
1964
1965<!-- YAML
1966changes:
1967  - version: v12.0.0
1968    pr-url: https://github.com/nodejs/node/pull/26530
1969    description: End-of-Life.
1970  - version:
1971    - v10.0.0
1972    - v9.6.0
1973    - v8.12.0
1974    pr-url: https://github.com/nodejs/node/pull/18632
1975    description: Runtime deprecation.
1976-->
1977
1978Type: End-of-Life
1979
1980The embedded API provided by AsyncHooks exposes `.emitBefore()` and
1981`.emitAfter()` methods which are very easy to use incorrectly which can lead
1982to unrecoverable errors.
1983
1984Use [`asyncResource.runInAsyncScope()`][] API instead which provides a much
1985safer, and more convenient, alternative. See
1986<https://github.com/nodejs/node/pull/18513>.
1987
1988### DEP0099: Async context-unaware `node::MakeCallback` C++ APIs
1989
1990<!-- YAML
1991changes:
1992  - version: v10.0.0
1993    pr-url: https://github.com/nodejs/node/pull/18632
1994    description: Compile-time deprecation.
1995-->
1996
1997Type: Compile-time
1998
1999Certain versions of `node::MakeCallback` APIs available to native addons are
2000deprecated. Please use the versions of the API that accept an `async_context`
2001parameter.
2002
2003### DEP0100: `process.assert()`
2004
2005<!-- YAML
2006changes:
2007  - version: v10.0.0
2008    pr-url: https://github.com/nodejs/node/pull/18666
2009    description: Runtime deprecation.
2010  - version: v0.3.7
2011    description: Documentation-only deprecation.
2012-->
2013
2014Type: Runtime
2015
2016`process.assert()` is deprecated. Please use the [`assert`][] module instead.
2017
2018This was never a documented feature.
2019
2020### DEP0101: `--with-lttng`
2021
2022<!-- YAML
2023changes:
2024  - version: v10.0.0
2025    pr-url: https://github.com/nodejs/node/pull/18982
2026    description: End-of-Life.
2027-->
2028
2029Type: End-of-Life
2030
2031The `--with-lttng` compile-time option has been removed.
2032
2033### DEP0102: Using `noAssert` in `Buffer#(read|write)` operations
2034
2035<!-- YAML
2036changes:
2037  - version: v10.0.0
2038    pr-url: https://github.com/nodejs/node/pull/18395
2039    description: End-of-Life.
2040-->
2041
2042Type: End-of-Life
2043
2044Using the `noAssert` argument has no functionality anymore. All input is
2045verified regardless of the value of `noAssert`. Skipping the verification
2046could lead to hard-to-find errors and crashes.
2047
2048### DEP0103: `process.binding('util').is[...]` typechecks
2049
2050<!-- YAML
2051changes:
2052  - version: v10.9.0
2053    pr-url: https://github.com/nodejs/node/pull/22004
2054    description: Superseded by [DEP0111](#DEP0111).
2055  - version: v10.0.0
2056    pr-url: https://github.com/nodejs/node/pull/18415
2057    description: Documentation-only deprecation.
2058-->
2059
2060Type: Documentation-only (supports [`--pending-deprecation`][])
2061
2062Using `process.binding()` in general should be avoided. The type checking
2063methods in particular can be replaced by using [`util.types`][].
2064
2065This deprecation has been superseded by the deprecation of the
2066`process.binding()` API ([DEP0111](#DEP0111)).
2067
2068### DEP0104: `process.env` string coercion
2069
2070<!-- YAML
2071changes:
2072  - version: v10.0.0
2073    pr-url: https://github.com/nodejs/node/pull/18990
2074    description: Documentation-only deprecation.
2075-->
2076
2077Type: Documentation-only (supports [`--pending-deprecation`][])
2078
2079When assigning a non-string property to [`process.env`][], the assigned value is
2080implicitly converted to a string. This behavior is deprecated if the assigned
2081value is not a string, boolean, or number. In the future, such assignment might
2082result in a thrown error. Please convert the property to a string before
2083assigning it to `process.env`.
2084
2085### DEP0105: `decipher.finaltol`
2086
2087<!-- YAML
2088changes:
2089  - version: v11.0.0
2090    pr-url: https://github.com/nodejs/node/pull/19941
2091    description: End-of-Life.
2092  - version: v10.0.0
2093    pr-url: https://github.com/nodejs/node/pull/19353
2094    description: Runtime deprecation.
2095-->
2096
2097Type: End-of-Life
2098
2099`decipher.finaltol()` has never been documented and was an alias for
2100[`decipher.final()`][]. This API has been removed, and it is recommended to use
2101[`decipher.final()`][] instead.
2102
2103### DEP0106: `crypto.createCipher` and `crypto.createDecipher`
2104
2105<!-- YAML
2106changes:
2107  - version: v11.0.0
2108    pr-url: https://github.com/nodejs/node/pull/22089
2109    description: Runtime deprecation.
2110  - version: v10.0.0
2111    pr-url: https://github.com/nodejs/node/pull/19343
2112    description: Documentation-only deprecation.
2113-->
2114
2115Type: Runtime
2116
2117Using [`crypto.createCipher()`][] and [`crypto.createDecipher()`][] must be
2118avoided as they use a weak key derivation function (MD5 with no salt) and static
2119initialization vectors. It is recommended to derive a key using
2120[`crypto.pbkdf2()`][] or [`crypto.scrypt()`][] with random salts and to use
2121[`crypto.createCipheriv()`][] and [`crypto.createDecipheriv()`][] to obtain the
2122[`Cipher`][] and [`Decipher`][] objects respectively.
2123
2124### DEP0107: `tls.convertNPNProtocols()`
2125
2126<!-- YAML
2127changes:
2128  - version: v11.0.0
2129    pr-url: https://github.com/nodejs/node/pull/20736
2130    description: End-of-Life.
2131  - version: v10.0.0
2132    pr-url: https://github.com/nodejs/node/pull/19403
2133    description: Runtime deprecation.
2134-->
2135
2136Type: End-of-Life
2137
2138This was an undocumented helper function not intended for use outside Node.js
2139core and obsoleted by the removal of NPN (Next Protocol Negotiation) support.
2140
2141### DEP0108: `zlib.bytesRead`
2142
2143<!-- YAML
2144changes:
2145  - version: v11.0.0
2146    pr-url: https://github.com/nodejs/node/pull/23308
2147    description: Runtime deprecation.
2148  - version: v10.0.0
2149    pr-url: https://github.com/nodejs/node/pull/19414
2150    description: Documentation-only deprecation.
2151-->
2152
2153Type: Runtime
2154
2155Deprecated alias for [`zlib.bytesWritten`][]. This original name was chosen
2156because it also made sense to interpret the value as the number of bytes
2157read by the engine, but is inconsistent with other streams in Node.js that
2158expose values under these names.
2159
2160### DEP0109: `http`, `https`, and `tls` support for invalid URLs
2161
2162<!-- YAML
2163changes:
2164  - version: v16.0.0
2165    pr-url: https://github.com/nodejs/node/pull/36853
2166    description: End-of-Life.
2167  - version: v11.0.0
2168    pr-url: https://github.com/nodejs/node/pull/20270
2169    description: Runtime deprecation.
2170-->
2171
2172Type: End-of-Life
2173
2174Some previously supported (but strictly invalid) URLs were accepted through the
2175[`http.request()`][], [`http.get()`][], [`https.request()`][],
2176[`https.get()`][], and [`tls.checkServerIdentity()`][] APIs because those were
2177accepted by the legacy `url.parse()` API. The mentioned APIs now use the WHATWG
2178URL parser that requires strictly valid URLs. Passing an invalid URL is
2179deprecated and support will be removed in the future.
2180
2181### DEP0110: `vm.Script` cached data
2182
2183<!-- YAML
2184changes:
2185  - version: v10.6.0
2186    pr-url: https://github.com/nodejs/node/pull/20300
2187    description: Documentation-only deprecation.
2188-->
2189
2190Type: Documentation-only
2191
2192The `produceCachedData` option is deprecated. Use
2193[`script.createCachedData()`][] instead.
2194
2195### DEP0111: `process.binding()`
2196
2197<!-- YAML
2198changes:
2199  - version: v11.12.0
2200    pr-url: https://github.com/nodejs/node/pull/26500
2201    description: Added support for `--pending-deprecation`.
2202  - version: v10.9.0
2203    pr-url: https://github.com/nodejs/node/pull/22004
2204    description: Documentation-only deprecation.
2205-->
2206
2207Type: Documentation-only (supports [`--pending-deprecation`][])
2208
2209`process.binding()` is for use by Node.js internal code only.
2210
2211While `process.binding()` has not reached End-of-Life status in general, it is
2212unavailable when [policies][] are enabled.
2213
2214### DEP0112: `dgram` private APIs
2215
2216<!-- YAML
2217changes:
2218  - version: v11.0.0
2219    pr-url: https://github.com/nodejs/node/pull/22011
2220    description: Runtime deprecation.
2221-->
2222
2223Type: Runtime
2224
2225The `node:dgram` module previously contained several APIs that were never meant
2226to accessed outside of Node.js core: `Socket.prototype._handle`,
2227`Socket.prototype._receiving`, `Socket.prototype._bindState`,
2228`Socket.prototype._queue`, `Socket.prototype._reuseAddr`,
2229`Socket.prototype._healthCheck()`, `Socket.prototype._stopReceiving()`, and
2230`dgram._createSocketHandle()`.
2231
2232### DEP0113: `Cipher.setAuthTag()`, `Decipher.getAuthTag()`
2233
2234<!-- YAML
2235changes:
2236  - version: v12.0.0
2237    pr-url: https://github.com/nodejs/node/pull/26249
2238    description: End-of-Life.
2239  - version: v11.0.0
2240    pr-url: https://github.com/nodejs/node/pull/22126
2241    description: Runtime deprecation.
2242-->
2243
2244Type: End-of-Life
2245
2246`Cipher.setAuthTag()` and `Decipher.getAuthTag()` are no longer available. They
2247were never documented and would throw when called.
2248
2249### DEP0114: `crypto._toBuf()`
2250
2251<!-- YAML
2252changes:
2253  - version: v12.0.0
2254    pr-url: https://github.com/nodejs/node/pull/25338
2255    description: End-of-Life.
2256  - version: v11.0.0
2257    pr-url: https://github.com/nodejs/node/pull/22501
2258    description: Runtime deprecation.
2259-->
2260
2261Type: End-of-Life
2262
2263The `crypto._toBuf()` function was not designed to be used by modules outside
2264of Node.js core and was removed.
2265
2266<!--lint disable nodejs-yaml-comments -->
2267
2268### DEP0115: `crypto.prng()`, `crypto.pseudoRandomBytes()`, `crypto.rng()`
2269
2270<!-- YAML
2271changes:
2272  - version: v11.0.0
2273    pr-url:
2274      - https://github.com/nodejs/node/pull/22519
2275      - https://github.com/nodejs/node/pull/23017
2276    description: Added documentation-only deprecation
2277                 with `--pending-deprecation` support.
2278-->
2279
2280Type: Documentation-only (supports [`--pending-deprecation`][])
2281
2282<!--lint enable nodejs-yaml-comments -->
2283
2284In recent versions of Node.js, there is no difference between
2285[`crypto.randomBytes()`][] and `crypto.pseudoRandomBytes()`. The latter is
2286deprecated along with the undocumented aliases `crypto.prng()` and
2287`crypto.rng()` in favor of [`crypto.randomBytes()`][] and might be removed in a
2288future release.
2289
2290### DEP0116: Legacy URL API
2291
2292<!-- YAML
2293changes:
2294  - version: v18.13.0
2295    pr-url: https://github.com/nodejs/node/pull/44919
2296    description: \`url.parse()` is deprecated again in DEP0169.
2297  - version:
2298      - v15.13.0
2299      - v14.17.0
2300    pr-url: https://github.com/nodejs/node/pull/37784
2301    description: Deprecation revoked. Status changed to "Legacy".
2302  - version: v11.0.0
2303    pr-url: https://github.com/nodejs/node/pull/22715
2304    description: Documentation-only deprecation.
2305-->
2306
2307Type: Deprecation revoked
2308
2309The [legacy URL API][] is deprecated. This includes [`url.format()`][],
2310[`url.parse()`][], [`url.resolve()`][], and the [legacy `urlObject`][]. Please
2311use the [WHATWG URL API][] instead.
2312
2313### DEP0117: Native crypto handles
2314
2315<!-- YAML
2316changes:
2317  - version: v12.0.0
2318    pr-url: https://github.com/nodejs/node/pull/27011
2319    description: End-of-Life.
2320  - version: v11.0.0
2321    pr-url: https://github.com/nodejs/node/pull/22747
2322    description: Runtime deprecation.
2323-->
2324
2325Type: End-of-Life
2326
2327Previous versions of Node.js exposed handles to internal native objects through
2328the `_handle` property of the `Cipher`, `Decipher`, `DiffieHellman`,
2329`DiffieHellmanGroup`, `ECDH`, `Hash`, `Hmac`, `Sign`, and `Verify` classes.
2330The `_handle` property has been removed because improper use of the native
2331object can lead to crashing the application.
2332
2333### DEP0118: `dns.lookup()` support for a falsy host name
2334
2335<!-- YAML
2336changes:
2337  - version: v11.0.0
2338    pr-url: https://github.com/nodejs/node/pull/23173
2339    description: Runtime deprecation.
2340-->
2341
2342Type: Runtime
2343
2344Previous versions of Node.js supported `dns.lookup()` with a falsy host name
2345like `dns.lookup(false)` due to backward compatibility.
2346This behavior is undocumented and is thought to be unused in real world apps.
2347It will become an error in future versions of Node.js.
2348
2349### DEP0119: `process.binding('uv').errname()` private API
2350
2351<!-- YAML
2352changes:
2353  - version: v11.0.0
2354    pr-url: https://github.com/nodejs/node/pull/23597
2355    description: Documentation-only deprecation.
2356-->
2357
2358Type: Documentation-only (supports [`--pending-deprecation`][])
2359
2360`process.binding('uv').errname()` is deprecated. Please use
2361[`util.getSystemErrorName()`][] instead.
2362
2363### DEP0120: Windows Performance Counter support
2364
2365<!-- YAML
2366changes:
2367  - version: v12.0.0
2368    pr-url: https://github.com/nodejs/node/pull/24862
2369    description: End-of-Life.
2370  - version: v11.0.0
2371    pr-url: https://github.com/nodejs/node/pull/22485
2372    description: Runtime deprecation.
2373-->
2374
2375Type: End-of-Life
2376
2377Windows Performance Counter support has been removed from Node.js. The
2378undocumented `COUNTER_NET_SERVER_CONNECTION()`,
2379`COUNTER_NET_SERVER_CONNECTION_CLOSE()`, `COUNTER_HTTP_SERVER_REQUEST()`,
2380`COUNTER_HTTP_SERVER_RESPONSE()`, `COUNTER_HTTP_CLIENT_REQUEST()`, and
2381`COUNTER_HTTP_CLIENT_RESPONSE()` functions have been deprecated.
2382
2383### DEP0121: `net._setSimultaneousAccepts()`
2384
2385<!-- YAML
2386changes:
2387  - version: v12.0.0
2388    pr-url: https://github.com/nodejs/node/pull/23760
2389    description: Runtime deprecation.
2390-->
2391
2392Type: Runtime
2393
2394The undocumented `net._setSimultaneousAccepts()` function was originally
2395intended for debugging and performance tuning when using the
2396`node:child_process` and `node:cluster` modules on Windows. The function is not
2397generally useful and is being removed. See discussion here:
2398<https://github.com/nodejs/node/issues/18391>
2399
2400### DEP0122: `tls` `Server.prototype.setOptions()`
2401
2402<!-- YAML
2403changes:
2404  - version: v12.0.0
2405    pr-url: https://github.com/nodejs/node/pull/23820
2406    description: Runtime deprecation.
2407-->
2408
2409Type: Runtime
2410
2411Please use `Server.prototype.setSecureContext()` instead.
2412
2413### DEP0123: setting the TLS ServerName to an IP address
2414
2415<!-- YAML
2416changes:
2417  - version: v12.0.0
2418    pr-url: https://github.com/nodejs/node/pull/23329
2419    description: Runtime deprecation.
2420-->
2421
2422Type: Runtime
2423
2424Setting the TLS ServerName to an IP address is not permitted by
2425[RFC 6066][]. This will be ignored in a future version.
2426
2427### DEP0124: using `REPLServer.rli`
2428
2429<!-- YAML
2430changes:
2431  - version: v15.0.0
2432    pr-url: https://github.com/nodejs/node/pull/33286
2433    description: End-of-Life.
2434  - version: v12.0.0
2435    pr-url: https://github.com/nodejs/node/pull/26260
2436    description: Runtime deprecation.
2437-->
2438
2439Type: End-of-Life
2440
2441This property is a reference to the instance itself.
2442
2443### DEP0125: `require('node:_stream_wrap')`
2444
2445<!-- YAML
2446changes:
2447  - version: v12.0.0
2448    pr-url: https://github.com/nodejs/node/pull/26245
2449    description: Runtime deprecation.
2450-->
2451
2452Type: Runtime
2453
2454The `node:_stream_wrap` module is deprecated.
2455
2456### DEP0126: `timers.active()`
2457
2458<!-- YAML
2459changes:
2460  - version: v11.14.0
2461    pr-url: https://github.com/nodejs/node/pull/26760
2462    description: Runtime deprecation.
2463-->
2464
2465Type: Runtime
2466
2467The previously undocumented `timers.active()` is deprecated.
2468Please use the publicly documented [`timeout.refresh()`][] instead.
2469If re-referencing the timeout is necessary, [`timeout.ref()`][] can be used
2470with no performance impact since Node.js 10.
2471
2472### DEP0127: `timers._unrefActive()`
2473
2474<!-- YAML
2475changes:
2476  - version: v11.14.0
2477    pr-url: https://github.com/nodejs/node/pull/26760
2478    description: Runtime deprecation.
2479-->
2480
2481Type: Runtime
2482
2483The previously undocumented and "private" `timers._unrefActive()` is deprecated.
2484Please use the publicly documented [`timeout.refresh()`][] instead.
2485If unreferencing the timeout is necessary, [`timeout.unref()`][] can be used
2486with no performance impact since Node.js 10.
2487
2488### DEP0128: modules with an invalid `main` entry and an `index.js` file
2489
2490<!-- YAML
2491changes:
2492  - version: v16.0.0
2493    pr-url: https://github.com/nodejs/node/pull/37204
2494    description: Runtime deprecation.
2495  - version: v12.0.0
2496    pr-url: https://github.com/nodejs/node/pull/26823
2497    description: Documentation-only.
2498-->
2499
2500Type: Runtime
2501
2502Modules that have an invalid `main` entry (e.g., `./does-not-exist.js`) and
2503also have an `index.js` file in the top level directory will resolve the
2504`index.js` file. That is deprecated and is going to throw an error in future
2505Node.js versions.
2506
2507### DEP0129: `ChildProcess._channel`
2508
2509<!-- YAML
2510changes:
2511  - version: v13.0.0
2512    pr-url: https://github.com/nodejs/node/pull/27949
2513    description: Runtime deprecation.
2514  - version: v11.14.0
2515    pr-url: https://github.com/nodejs/node/pull/26982
2516    description: Documentation-only.
2517-->
2518
2519Type: Runtime
2520
2521The `_channel` property of child process objects returned by `spawn()` and
2522similar functions is not intended for public use. Use `ChildProcess.channel`
2523instead.
2524
2525### DEP0130: `Module.createRequireFromPath()`
2526
2527<!-- YAML
2528changes:
2529  - version: v16.0.0
2530    pr-url: https://github.com/nodejs/node/pull/37201
2531    description: End-of-life.
2532  - version: v13.0.0
2533    pr-url: https://github.com/nodejs/node/pull/27951
2534    description: Runtime deprecation.
2535  - version: v12.2.0
2536    pr-url: https://github.com/nodejs/node/pull/27405
2537    description: Documentation-only.
2538-->
2539
2540Type: End-of-Life
2541
2542Use [`module.createRequire()`][] instead.
2543
2544### DEP0131: Legacy HTTP parser
2545
2546<!-- YAML
2547changes:
2548  - version: v13.0.0
2549    pr-url: https://github.com/nodejs/node/pull/29589
2550    description: This feature has been removed.
2551  - version: v12.22.0
2552    pr-url: https://github.com/nodejs/node/pull/37603
2553    description: Runtime deprecation.
2554  - version: v12.3.0
2555    pr-url: https://github.com/nodejs/node/pull/27498
2556    description: Documentation-only.
2557-->
2558
2559Type: End-of-Life
2560
2561The legacy HTTP parser, used by default in versions of Node.js prior to 12.0.0,
2562is deprecated and has been removed in v13.0.0. Prior to v13.0.0, the
2563`--http-parser=legacy` command-line flag could be used to revert to using the
2564legacy parser.
2565
2566### DEP0132: `worker.terminate()` with callback
2567
2568<!-- YAML
2569changes:
2570  - version: v12.5.0
2571    pr-url: https://github.com/nodejs/node/pull/28021
2572    description: Runtime deprecation.
2573-->
2574
2575Type: Runtime
2576
2577Passing a callback to [`worker.terminate()`][] is deprecated. Use the returned
2578`Promise` instead, or a listener to the worker's `'exit'` event.
2579
2580### DEP0133: `http` `connection`
2581
2582<!-- YAML
2583changes:
2584  - version: v12.12.0
2585    pr-url: https://github.com/nodejs/node/pull/29015
2586    description: Documentation-only deprecation.
2587-->
2588
2589Type: Documentation-only
2590
2591Prefer [`response.socket`][] over [`response.connection`][] and
2592[`request.socket`][] over [`request.connection`][].
2593
2594### DEP0134: `process._tickCallback`
2595
2596<!-- YAML
2597changes:
2598  - version: v12.12.0
2599    pr-url: https://github.com/nodejs/node/pull/29781
2600    description: Documentation-only deprecation.
2601-->
2602
2603Type: Documentation-only (supports [`--pending-deprecation`][])
2604
2605The `process._tickCallback` property was never documented as
2606an officially supported API.
2607
2608### DEP0135: `WriteStream.open()` and `ReadStream.open()` are internal
2609
2610<!-- YAML
2611changes:
2612  - version: v13.0.0
2613    pr-url: https://github.com/nodejs/node/pull/29061
2614    description: Runtime deprecation.
2615-->
2616
2617Type: Runtime
2618
2619[`WriteStream.open()`][] and [`ReadStream.open()`][] are undocumented internal
2620APIs that do not make sense to use in userland. File streams should always be
2621opened through their corresponding factory methods [`fs.createWriteStream()`][]
2622and [`fs.createReadStream()`][]) or by passing a file descriptor in options.
2623
2624### DEP0136: `http` `finished`
2625
2626<!-- YAML
2627changes:
2628  - version:
2629     - v13.4.0
2630     - v12.16.0
2631    pr-url: https://github.com/nodejs/node/pull/28679
2632    description: Documentation-only deprecation.
2633-->
2634
2635Type: Documentation-only
2636
2637[`response.finished`][] indicates whether [`response.end()`][] has been
2638called, not whether `'finish'` has been emitted and the underlying data
2639is flushed.
2640
2641Use [`response.writableFinished`][] or [`response.writableEnded`][]
2642accordingly instead to avoid the ambiguity.
2643
2644To maintain existing behavior `response.finished` should be replaced with
2645`response.writableEnded`.
2646
2647### DEP0137: Closing fs.FileHandle on garbage collection
2648
2649<!-- YAML
2650changes:
2651  - version: v14.0.0
2652    pr-url: https://github.com/nodejs/node/pull/28396
2653    description: Runtime deprecation.
2654-->
2655
2656Type: Runtime
2657
2658Allowing a [`fs.FileHandle`][] object to be closed on garbage collection is
2659deprecated. In the future, doing so might result in a thrown error that will
2660terminate the process.
2661
2662Please ensure that all `fs.FileHandle` objects are explicitly closed using
2663`FileHandle.prototype.close()` when the `fs.FileHandle` is no longer needed:
2664
2665```js
2666const fsPromises = require('node:fs').promises;
2667async function openAndClose() {
2668  let filehandle;
2669  try {
2670    filehandle = await fsPromises.open('thefile.txt', 'r');
2671  } finally {
2672    if (filehandle !== undefined)
2673      await filehandle.close();
2674  }
2675}
2676```
2677
2678### DEP0138: `process.mainModule`
2679
2680<!-- YAML
2681changes:
2682  - version: v14.0.0
2683    pr-url: https://github.com/nodejs/node/pull/32232
2684    description: Documentation-only deprecation.
2685-->
2686
2687Type: Documentation-only
2688
2689[`process.mainModule`][] is a CommonJS-only feature while `process` global
2690object is shared with non-CommonJS environment. Its use within ECMAScript
2691modules is unsupported.
2692
2693It is deprecated in favor of [`require.main`][], because it serves the same
2694purpose and is only available on CommonJS environment.
2695
2696### DEP0139: `process.umask()` with no arguments
2697
2698<!-- YAML
2699changes:
2700  - version:
2701    - v14.0.0
2702    - v12.19.0
2703    pr-url: https://github.com/nodejs/node/pull/32499
2704    description: Documentation-only deprecation.
2705-->
2706
2707Type: Documentation-only
2708
2709Calling `process.umask()` with no argument causes the process-wide umask to be
2710written twice. This introduces a race condition between threads, and is a
2711potential security vulnerability. There is no safe, cross-platform alternative
2712API.
2713
2714### DEP0140: Use `request.destroy()` instead of `request.abort()`
2715
2716<!-- YAML
2717changes:
2718  - version:
2719    - v14.1.0
2720    - v13.14.0
2721    pr-url: https://github.com/nodejs/node/pull/32807
2722    description: Documentation-only deprecation.
2723-->
2724
2725Type: Documentation-only
2726
2727Use [`request.destroy()`][] instead of [`request.abort()`][].
2728
2729### DEP0141: `repl.inputStream` and `repl.outputStream`
2730
2731<!-- YAML
2732changes:
2733  - version: v14.3.0
2734    pr-url: https://github.com/nodejs/node/pull/33294
2735    description: Documentation-only (supports [`--pending-deprecation`][]).
2736-->
2737
2738Type: Documentation-only (supports [`--pending-deprecation`][])
2739
2740The `node:repl` module exported the input and output stream twice. Use `.input`
2741instead of `.inputStream` and `.output` instead of `.outputStream`.
2742
2743### DEP0142: `repl._builtinLibs`
2744
2745<!-- YAML
2746changes:
2747  - version: v14.3.0
2748    pr-url: https://github.com/nodejs/node/pull/33294
2749    description: Documentation-only (supports [`--pending-deprecation`][]).
2750-->
2751
2752Type: Documentation-only
2753
2754The `node:repl` module exports a `_builtinLibs` property that contains an array
2755of built-in modules. It was incomplete so far and instead it's better to rely
2756upon `require('node:module').builtinModules`.
2757
2758### DEP0143: `Transform._transformState`
2759
2760<!-- YAML
2761changes:
2762  - version: v14.5.0
2763    pr-url: https://github.com/nodejs/node/pull/33126
2764    description: Runtime deprecation.
2765-->
2766
2767Type: Runtime
2768`Transform._transformState` will be removed in future versions where it is
2769no longer required due to simplification of the implementation.
2770
2771### DEP0144: `module.parent`
2772
2773<!-- YAML
2774changes:
2775  - version:
2776    - v14.6.0
2777    - v12.19.0
2778    pr-url: https://github.com/nodejs/node/pull/32217
2779    description: Documentation-only deprecation.
2780-->
2781
2782Type: Documentation-only (supports [`--pending-deprecation`][])
2783
2784A CommonJS module can access the first module that required it using
2785`module.parent`. This feature is deprecated because it does not work
2786consistently in the presence of ECMAScript modules and because it gives an
2787inaccurate representation of the CommonJS module graph.
2788
2789Some modules use it to check if they are the entry point of the current process.
2790Instead, it is recommended to compare `require.main` and `module`:
2791
2792```js
2793if (require.main === module) {
2794  // Code section that will run only if current file is the entry point.
2795}
2796```
2797
2798When looking for the CommonJS modules that have required the current one,
2799`require.cache` and `module.children` can be used:
2800
2801```js
2802const moduleParents = Object.values(require.cache)
2803  .filter((m) => m.children.includes(module));
2804```
2805
2806### DEP0145: `socket.bufferSize`
2807
2808<!-- YAML
2809changes:
2810  - version: v14.6.0
2811    pr-url: https://github.com/nodejs/node/pull/34088
2812    description: Documentation-only deprecation.
2813-->
2814
2815Type: Documentation-only
2816
2817[`socket.bufferSize`][] is just an alias for [`writable.writableLength`][].
2818
2819### DEP0146: `new crypto.Certificate()`
2820
2821<!-- YAML
2822changes:
2823  - version: v14.9.0
2824    pr-url: https://github.com/nodejs/node/pull/34697
2825    description: Documentation-only deprecation.
2826-->
2827
2828Type: Documentation-only
2829
2830The [`crypto.Certificate()` constructor][] is deprecated. Use
2831[static methods of `crypto.Certificate()`][] instead.
2832
2833### DEP0147: `fs.rmdir(path, { recursive: true })`
2834
2835<!-- YAML
2836changes:
2837  - version: v16.0.0
2838    pr-url: https://github.com/nodejs/node/pull/37302
2839    description: Runtime deprecation.
2840  - version: v15.0.0
2841    pr-url: https://github.com/nodejs/node/pull/35562
2842    description: Runtime deprecation for permissive behavior.
2843  - version: v14.14.0
2844    pr-url: https://github.com/nodejs/node/pull/35579
2845    description: Documentation-only deprecation.
2846-->
2847
2848Type: Runtime
2849
2850In future versions of Node.js, `recursive` option will be ignored for
2851`fs.rmdir`, `fs.rmdirSync`, and `fs.promises.rmdir`.
2852
2853Use `fs.rm(path, { recursive: true, force: true })`,
2854`fs.rmSync(path, { recursive: true, force: true })` or
2855`fs.promises.rm(path, { recursive: true, force: true })` instead.
2856
2857### DEP0148: Folder mappings in `"exports"` (trailing `"/"`)
2858
2859<!-- YAML
2860changes:
2861  - version: v17.0.0
2862    pr-url: https://github.com/nodejs/node/pull/40121
2863    description: End-of-Life.
2864  - version: v16.0.0
2865    pr-url: https://github.com/nodejs/node/pull/37215
2866    description: Runtime deprecation.
2867  - version: v15.1.0
2868    pr-url: https://github.com/nodejs/node/pull/35747
2869    description: Runtime deprecation for self-referencing imports.
2870  - version: v14.13.0
2871    pr-url: https://github.com/nodejs/node/pull/34718
2872    description: Documentation-only deprecation.
2873-->
2874
2875Type: Runtime
2876
2877Using a trailing `"/"` to define subpath folder mappings in the
2878[subpath exports][] or [subpath imports][] fields is deprecated. Use
2879[subpath patterns][] instead.
2880
2881### DEP0149: `http.IncomingMessage#connection`
2882
2883<!-- YAML
2884changes:
2885  - version: v16.0.0
2886    pr-url: https://github.com/nodejs/node/pull/33768
2887    description: Documentation-only deprecation.
2888 -->
2889
2890Type: Documentation-only.
2891
2892Prefer [`message.socket`][] over [`message.connection`][].
2893
2894### DEP0150: Changing the value of `process.config`
2895
2896<!-- YAML
2897changes:
2898  - version: v19.0.0
2899    pr-url: https://github.com/nodejs/node/pull/43627
2900    description: End-of-Life.
2901  - version: v16.0.0
2902    pr-url: https://github.com/nodejs/node/pull/36902
2903    description: Runtime deprecation.
2904-->
2905
2906Type: End-of-Life
2907
2908The `process.config` property provides access to Node.js compile-time settings.
2909However, the property is mutable and therefore subject to tampering. The ability
2910to change the value will be removed in a future version of Node.js.
2911
2912### DEP0151: Main index lookup and extension searching
2913
2914<!-- YAML
2915changes:
2916  - version: v16.0.0
2917    pr-url: https://github.com/nodejs/node/pull/37206
2918    description: Runtime deprecation.
2919  - version:
2920      - v15.8.0
2921      - v14.18.0
2922    pr-url: https://github.com/nodejs/node/pull/36918
2923    description: Documentation-only deprecation
2924                 with `--pending-deprecation` support.
2925-->
2926
2927Type: Runtime
2928
2929Previously, `index.js` and extension searching lookups would apply to
2930`import 'pkg'` main entry point resolution, even when resolving ES modules.
2931
2932With this deprecation, all ES module main entry point resolutions require
2933an explicit [`"exports"` or `"main"` entry][] with the exact file extension.
2934
2935### DEP0152: Extension PerformanceEntry properties
2936
2937<!-- YAML
2938changes:
2939  - version: v16.0.0
2940    pr-url: https://github.com/nodejs/node/pull/37136
2941    description: Runtime deprecation.
2942-->
2943
2944Type: Runtime
2945
2946The `'gc'`, `'http2'`, and `'http'` {PerformanceEntry} object types have
2947additional properties assigned to them that provide additional information.
2948These properties are now available within the standard `detail` property
2949of the `PerformanceEntry` object. The existing accessors have been
2950deprecated and should no longer be used.
2951
2952### DEP0153: `dns.lookup` and `dnsPromises.lookup` options type coercion
2953
2954<!-- YAML
2955changes:
2956  - version: v18.0.0
2957    pr-url: https://github.com/nodejs/node/pull/41431
2958    description: End-of-Life.
2959  - version: v17.0.0
2960    pr-url: https://github.com/nodejs/node/pull/39793
2961    description: Runtime deprecation.
2962  - version: v16.8.0
2963    pr-url: https://github.com/nodejs/node/pull/38906
2964    description: Documentation-only deprecation.
2965-->
2966
2967Type: End-of-Life
2968
2969Using a non-nullish non-integer value for `family` option, a non-nullish
2970non-number value for `hints` option, a non-nullish non-boolean value for `all`
2971option, or a non-nullish non-boolean value for `verbatim` option in
2972[`dns.lookup()`][] and [`dnsPromises.lookup()`][] throws an
2973`ERR_INVALID_ARG_TYPE` error.
2974
2975### DEP0154: RSA-PSS generate key pair options
2976
2977<!-- YAML
2978changes:
2979  - version: v16.10.0
2980    pr-url: https://github.com/nodejs/node/pull/39927
2981    description: Documentation-only deprecation.
2982-->
2983
2984Type: Documentation-only (supports [`--pending-deprecation`][])
2985
2986The `'hash'` and `'mgf1Hash'` options are replaced with `'hashAlgorithm'`
2987and `'mgf1HashAlgorithm'`.
2988
2989### DEP0155: Trailing slashes in pattern specifier resolutions
2990
2991<!-- YAML
2992changes:
2993  - version: v17.0.0
2994    pr-url: https://github.com/nodejs/node/pull/40117
2995    description: Runtime deprecation.
2996  - version: v16.10.0
2997    pr-url: https://github.com/nodejs/node/pull/40039
2998    description: Documentation-only deprecation
2999                 with `--pending-deprecation` support.
3000-->
3001
3002Type: Runtime
3003
3004The remapping of specifiers ending in `"/"` like `import 'pkg/x/'` is deprecated
3005for package `"exports"` and `"imports"` pattern resolutions.
3006
3007### DEP0156: `.aborted` property and `'abort'`, `'aborted'` event in `http`
3008
3009<!-- YAML
3010changes:
3011  - version:
3012    - v17.0.0
3013    - v16.12.0
3014    pr-url: https://github.com/nodejs/node/pull/36670
3015    description: Documentation-only deprecation.
3016-->
3017
3018Type: Documentation-only
3019
3020Move to {Stream} API instead, as the [`http.ClientRequest`][],
3021[`http.ServerResponse`][], and [`http.IncomingMessage`][] are all stream-based.
3022Check `stream.destroyed` instead of the `.aborted` property, and listen for
3023`'close'` instead of `'abort'`, `'aborted'` event.
3024
3025The `.aborted` property and `'abort'` event are only useful for detecting
3026`.abort()` calls. For closing a request early, use the Stream
3027`.destroy([error])` then check the `.destroyed` property and `'close'` event
3028should have the same effect. The receiving end should also check the
3029[`readable.readableEnded`][] value on [`http.IncomingMessage`][] to get whether
3030it was an aborted or graceful destroy.
3031
3032### DEP0157: Thenable support in streams
3033
3034<!-- YAML
3035changes:
3036  - version: v18.0.0
3037    pr-url: https://github.com/nodejs/node/pull/40773
3038    description: End-of-life.
3039  - version:
3040      - v17.2.0
3041      - v16.14.0
3042    pr-url: https://github.com/nodejs/node/pull/40860
3043    description: Documentation-only deprecation.
3044-->
3045
3046Type: End-of-Life
3047
3048An undocumented feature of Node.js streams was to support thenables in
3049implementation methods. This is now deprecated, use callbacks instead and avoid
3050use of async function for streams implementation methods.
3051
3052This feature caused users to encounter unexpected problems where the user
3053implements the function in callback style but uses e.g. an async method which
3054would cause an error since mixing promise and callback semantics is not valid.
3055
3056```js
3057const w = new Writable({
3058  async final(callback) {
3059    await someOp();
3060    callback();
3061  },
3062});
3063```
3064
3065### DEP0158: `buffer.slice(start, end)`
3066
3067<!-- YAML
3068changes:
3069  - version:
3070    - v17.5.0
3071    - v16.15.0
3072    pr-url: https://github.com/nodejs/node/pull/41596
3073    description: Documentation-only deprecation.
3074-->
3075
3076Type: Documentation-only
3077
3078This method was deprecated because it is not compatible with
3079`Uint8Array.prototype.slice()`, which is a superclass of `Buffer`.
3080
3081Use [`buffer.subarray`][] which does the same thing instead.
3082
3083### DEP0159: `ERR_INVALID_CALLBACK`
3084
3085<!-- YAML
3086changes:
3087  - version: v18.0.0
3088    pr-url: https://github.com/nodejs/node/pull/41678
3089    description: End-of-Life.
3090-->
3091
3092Type: End-of-Life
3093
3094This error code was removed due to adding more confusion to
3095the errors used for value type validation.
3096
3097### DEP0160: `process.on('multipleResolves', handler)`
3098
3099<!-- YAML
3100changes:
3101  - version: v18.0.0
3102    pr-url: https://github.com/nodejs/node/pull/41896
3103    description: Runtime deprecation.
3104  - version:
3105    - v17.6.0
3106    - v16.15.0
3107    pr-url: https://github.com/nodejs/node/pull/41872
3108    description: Documentation-only deprecation.
3109-->
3110
3111Type: Runtime.
3112
3113This event was deprecated because it did not work with V8 promise combinators
3114which diminished its usefulness.
3115
3116### DEP0161: `process._getActiveRequests()` and `process._getActiveHandles()`
3117
3118<!-- YAML
3119changes:
3120  - version:
3121    - v17.6.0
3122    - v16.15.0
3123    pr-url: https://github.com/nodejs/node/pull/41587
3124    description: Documentation-only deprecation.
3125-->
3126
3127Type: Documentation-only
3128
3129The `process._getActiveHandles()` and `process._getActiveRequests()`
3130functions are not intended for public use and can be removed in future
3131releases.
3132
3133Use [`process.getActiveResourcesInfo()`][] to get a list of types of active
3134resources and not the actual references.
3135
3136### DEP0162: `fs.write()`, `fs.writeFileSync()` coercion to string
3137
3138<!-- YAML
3139changes:
3140  - version: v19.0.0
3141    pr-url: https://github.com/nodejs/node/pull/42796
3142    description: End-of-Life.
3143  - version: v18.0.0
3144    pr-url: https://github.com/nodejs/node/pull/42607
3145    description: Runtime deprecation.
3146  - version:
3147    - v17.8.0
3148    - v16.15.0
3149    pr-url: https://github.com/nodejs/node/pull/42149
3150    description: Documentation-only deprecation.
3151-->
3152
3153Type: End-of-Life
3154
3155Implicit coercion of objects with own `toString` property, passed as second
3156parameter in [`fs.write()`][], [`fs.writeFile()`][], [`fs.appendFile()`][],
3157[`fs.writeFileSync()`][], and [`fs.appendFileSync()`][] is deprecated.
3158Convert them to primitive strings.
3159
3160### DEP0163: `channel.subscribe(onMessage)`, `channel.unsubscribe(onMessage)`
3161
3162<!-- YAML
3163changes:
3164  - version:
3165    - v18.7.0
3166    - v16.17.0
3167    pr-url: https://github.com/nodejs/node/pull/42714
3168    description: Documentation-only deprecation.
3169-->
3170
3171Type: Documentation-only
3172
3173These methods were deprecated because they can be used in a way which does not
3174hold the channel reference alive long enough to receive the events.
3175
3176Use [`diagnostics_channel.subscribe(name, onMessage)`][] or
3177[`diagnostics_channel.unsubscribe(name, onMessage)`][] which does the same
3178thing instead.
3179
3180### DEP0164: `process.exit(code)`, `process.exitCode` coercion to integer
3181
3182<!-- YAML
3183changes:
3184  - version: v18.10.0
3185    pr-url: https://github.com/nodejs/node/pull/44714
3186    description: Documentation-only deprecation of `process.exitCode` integer
3187                 coercion.
3188  - version:
3189    - v18.7.0
3190    - v16.17.0
3191    pr-url: https://github.com/nodejs/node/pull/43738
3192    description: Documentation-only deprecation of `process.exit(code)` integer
3193                 coercion.
3194-->
3195
3196Type: Documentation-only
3197
3198Values other than `undefined`, `null`, integer numbers, and integer strings
3199(e.g., `'1'`) are deprecated as value for the `code` parameter in
3200[`process.exit()`][] and as value to assign to [`process.exitCode`][].
3201
3202### DEP0165: `--trace-atomics-wait`
3203
3204<!-- YAML
3205changes:
3206  - version: v18.8.0
3207    pr-url: https://github.com/nodejs/node/pull/44093
3208    description: Documentation-only deprecation.
3209-->
3210
3211Type: Documentation-only
3212
3213The [`--trace-atomics-wait`][] flag is deprecated.
3214
3215### DEP0166: Double slashes in imports and exports targets
3216
3217<!-- YAML
3218changes:
3219  - version: v19.0.0
3220    pr-url: https://github.com/nodejs/node/pull/44495
3221    description: Runtime deprecation.
3222  - version: v18.10.0
3223    pr-url: https://github.com/nodejs/node/pull/44477
3224    description: Documentation-only deprecation
3225                 with `--pending-deprecation` support.
3226-->
3227
3228Type: Runtime
3229
3230Package imports and exports targets mapping into paths including a double slash
3231(of _"/"_ or _"\\"_) are deprecated and will fail with a resolution validation
3232error in a future release. This same deprecation also applies to pattern matches
3233starting or ending in a slash.
3234
3235### DEP0167: Weak `DiffieHellmanGroup` instances (`modp1`, `modp2`, `modp5`)
3236
3237<!-- YAML
3238changes:
3239  - version: v18.10.0
3240    pr-url: https://github.com/nodejs/node/pull/44588
3241    description: Documentation-only deprecation.
3242-->
3243
3244Type: Documentation-only
3245
3246The well-known MODP groups `modp1`, `modp2`, and `modp5` are deprecated because
3247they are not secure against practical attacks. See [RFC 8247 Section 2.4][] for
3248details.
3249
3250These groups might be removed in future versions of Node.js. Applications that
3251rely on these groups should evaluate using stronger MODP groups instead.
3252
3253### DEP0168: Unhandled exception in Node-API callbacks
3254
3255<!-- YAML
3256changes:
3257  - version:
3258    - v18.3.0
3259    - v16.17.0
3260    pr-url: https://github.com/nodejs/node/pull/36510
3261    description: Runtime deprecation.
3262-->
3263
3264Type: Runtime
3265
3266The implicit suppression of uncaught exceptions in Node-API callbacks is now
3267deprecated.
3268
3269Set the flag [`--force-node-api-uncaught-exceptions-policy`][] to force Node.js
3270to emit an [`'uncaughtException'`][] event if the exception is not handled in
3271Node-API callbacks.
3272
3273### DEP0169: Insecure url.parse()
3274
3275<!-- YAML
3276changes:
3277  - version: v18.17.0
3278    pr-url: https://github.com/nodejs/node/pull/47203
3279    description: Added support for `--pending-deprecation`.
3280  - version:
3281      - v18.13.0
3282    pr-url: https://github.com/nodejs/node/pull/44919
3283    description: Documentation-only deprecation.
3284-->
3285
3286Type: Documentation-only (supports [`--pending-deprecation`][])
3287
3288[`url.parse()`][] behavior is not standardized and prone to errors that
3289have security implications. Use the [WHATWG URL API][] instead. CVEs are not
3290issued for `url.parse()` vulnerabilities.
3291
3292### DEP0170: Invalid port when using `url.parse()`
3293
3294<!-- YAML
3295changes:
3296  - version:
3297    - v18.13.0
3298    pr-url: https://github.com/nodejs/node/pull/45576
3299    description: Documentation-only deprecation.
3300-->
3301
3302Type: Documentation-only
3303
3304[`url.parse()`][] accepts URLs with ports that are not numbers. This behavior
3305might result in host name spoofing with unexpected input. These URLs will throw
3306an error in future versions of Node.js, as the [WHATWG URL API][] does already.
3307
3308### DEP0171: Setters for `http.IncomingMessage` headers and trailers
3309
3310<!-- YAML
3311changes:
3312  - version:
3313      - v18.13.0
3314    pr-url: https://github.com/nodejs/node/pull/45697
3315    description: Documentation-only deprecation.
3316-->
3317
3318Type: Documentation-only
3319
3320In a future version of Node.js, [`message.headers`][],
3321[`message.headersDistinct`][], [`message.trailers`][], and
3322[`message.trailersDistinct`][] will be read-only.
3323
3324<!-- md-lint skip-deprecation DEP0172 -->
3325
3326<!-- md-lint skip-deprecation DEP0173 -->
3327
3328<!-- md-lint skip-deprecation DEP0174 -->
3329
3330<!-- md-lint skip-deprecation DEP0175 -->
3331
3332<!-- md-lint skip-deprecation DEP0176 -->
3333
3334<!-- md-lint skip-deprecation DEP0177 -->
3335
3336### DEP0178: `dirent.path`
3337
3338<!-- YAML
3339changes:
3340  - version: v18.20.0
3341    pr-url: https://github.com/nodejs/node/pull/51020
3342    description: Documentation-only deprecation.
3343-->
3344
3345Type: Documentation-only
3346
3347The [`dirent.path`][] is deprecated due to its lack of consistency across
3348release lines. Please use [`dirent.parentPath`][] instead.
3349
3350[NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
3351[RFC 6066]: https://tools.ietf.org/html/rfc6066#section-3
3352[RFC 8247 Section 2.4]: https://www.rfc-editor.org/rfc/rfc8247#section-2.4
3353[WHATWG URL API]: url.md#the-whatwg-url-api
3354[`"exports"` or `"main"` entry]: packages.md#main-entry-point-export
3355[`'uncaughtException'`]: process.md#event-uncaughtexception
3356[`--force-node-api-uncaught-exceptions-policy`]: cli.md#--force-node-api-uncaught-exceptions-policy
3357[`--pending-deprecation`]: cli.md#--pending-deprecation
3358[`--throw-deprecation`]: cli.md#--throw-deprecation
3359[`--trace-atomics-wait`]: cli.md#--trace-atomics-wait
3360[`--unhandled-rejections`]: cli.md#--unhandled-rejectionsmode
3361[`Buffer.allocUnsafeSlow(size)`]: buffer.md#static-method-bufferallocunsafeslowsize
3362[`Buffer.from(array)`]: buffer.md#static-method-bufferfromarray
3363[`Buffer.from(buffer)`]: buffer.md#static-method-bufferfrombuffer
3364[`Buffer.isBuffer()`]: buffer.md#static-method-bufferisbufferobj
3365[`Cipher`]: crypto.md#class-cipher
3366[`Decipher`]: crypto.md#class-decipher
3367[`REPLServer.clearBufferedCommand()`]: repl.md#replserverclearbufferedcommand
3368[`ReadStream.open()`]: fs.md#class-fsreadstream
3369[`Server.getConnections()`]: net.md#servergetconnectionscallback
3370[`Server.listen({fd: <number>})`]: net.md#serverlistenhandle-backlog-callback
3371[`SlowBuffer`]: buffer.md#class-slowbuffer
3372[`WriteStream.open()`]: fs.md#class-fswritestream
3373[`assert`]: assert.md
3374[`asyncResource.runInAsyncScope()`]: async_context.md#asyncresourceruninasyncscopefn-thisarg-args
3375[`buffer.subarray`]: buffer.md#bufsubarraystart-end
3376[`child_process`]: child_process.md
3377[`clearInterval()`]: timers.md#clearintervaltimeout
3378[`clearTimeout()`]: timers.md#cleartimeouttimeout
3379[`console.error()`]: console.md#consoleerrordata-args
3380[`console.log()`]: console.md#consolelogdata-args
3381[`crypto.Certificate()` constructor]: crypto.md#legacy-api
3382[`crypto.DEFAULT_ENCODING`]: crypto.md#cryptodefault_encoding
3383[`crypto.createCipher()`]: crypto.md#cryptocreatecipheralgorithm-password-options
3384[`crypto.createCipheriv()`]: crypto.md#cryptocreatecipherivalgorithm-key-iv-options
3385[`crypto.createDecipher()`]: crypto.md#cryptocreatedecipheralgorithm-password-options
3386[`crypto.createDecipheriv()`]: crypto.md#cryptocreatedecipherivalgorithm-key-iv-options
3387[`crypto.fips`]: crypto.md#cryptofips
3388[`crypto.pbkdf2()`]: crypto.md#cryptopbkdf2password-salt-iterations-keylen-digest-callback
3389[`crypto.randomBytes()`]: crypto.md#cryptorandombytessize-callback
3390[`crypto.scrypt()`]: crypto.md#cryptoscryptpassword-salt-keylen-options-callback
3391[`decipher.final()`]: crypto.md#decipherfinaloutputencoding
3392[`decipher.setAuthTag()`]: crypto.md#deciphersetauthtagbuffer-encoding
3393[`diagnostics_channel.subscribe(name, onMessage)`]: diagnostics_channel.md#diagnostics_channelsubscribename-onmessage
3394[`diagnostics_channel.unsubscribe(name, onMessage)`]: diagnostics_channel.md#diagnostics_channelunsubscribename-onmessage
3395[`dirent.parentPath`]: fs.md#direntparentpath
3396[`dirent.path`]: fs.md#direntpath
3397[`dns.lookup()`]: dns.md#dnslookuphostname-options-callback
3398[`dnsPromises.lookup()`]: dns.md#dnspromiseslookuphostname-options
3399[`domain`]: domain.md
3400[`ecdh.setPublicKey()`]: crypto.md#ecdhsetpublickeypublickey-encoding
3401[`emitter.listenerCount(eventName)`]: events.md#emitterlistenercounteventname-listener
3402[`events.listenerCount(emitter, eventName)`]: events.md#eventslistenercountemitter-eventname
3403[`fs.FileHandle`]: fs.md#class-filehandle
3404[`fs.access()`]: fs.md#fsaccesspath-mode-callback
3405[`fs.appendFile()`]: fs.md#fsappendfilepath-data-options-callback
3406[`fs.appendFileSync()`]: fs.md#fsappendfilesyncpath-data-options
3407[`fs.createReadStream()`]: fs.md#fscreatereadstreampath-options
3408[`fs.createWriteStream()`]: fs.md#fscreatewritestreampath-options
3409[`fs.exists(path, callback)`]: fs.md#fsexistspath-callback
3410[`fs.lchmod(path, mode, callback)`]: fs.md#fslchmodpath-mode-callback
3411[`fs.lchmodSync(path, mode)`]: fs.md#fslchmodsyncpath-mode
3412[`fs.lchown(path, uid, gid, callback)`]: fs.md#fslchownpath-uid-gid-callback
3413[`fs.lchownSync(path, uid, gid)`]: fs.md#fslchownsyncpath-uid-gid
3414[`fs.read()`]: fs.md#fsreadfd-buffer-offset-length-position-callback
3415[`fs.readSync()`]: fs.md#fsreadsyncfd-buffer-offset-length-position
3416[`fs.stat()`]: fs.md#fsstatpath-options-callback
3417[`fs.write()`]: fs.md#fswritefd-buffer-offset-length-position-callback
3418[`fs.writeFile()`]: fs.md#fswritefilefile-data-options-callback
3419[`fs.writeFileSync()`]: fs.md#fswritefilesyncfile-data-options
3420[`http.ClientRequest`]: http.md#class-httpclientrequest
3421[`http.IncomingMessage`]: http.md#class-httpincomingmessage
3422[`http.ServerResponse`]: http.md#class-httpserverresponse
3423[`http.get()`]: http.md#httpgetoptions-callback
3424[`http.request()`]: http.md#httprequestoptions-callback
3425[`https.get()`]: https.md#httpsgetoptions-callback
3426[`https.request()`]: https.md#httpsrequestoptions-callback
3427[`message.connection`]: http.md#messageconnection
3428[`message.headersDistinct`]: http.md#messageheadersdistinct
3429[`message.headers`]: http.md#messageheaders
3430[`message.socket`]: http.md#messagesocket
3431[`message.trailersDistinct`]: http.md#messagetrailersdistinct
3432[`message.trailers`]: http.md#messagetrailers
3433[`module.createRequire()`]: module.md#modulecreaterequirefilename
3434[`os.networkInterfaces()`]: os.md#osnetworkinterfaces
3435[`os.tmpdir()`]: os.md#ostmpdir
3436[`process.env`]: process.md#processenv
3437[`process.exit()`]: process.md#processexitcode
3438[`process.exitCode`]: process.md#processexitcode_1
3439[`process.getActiveResourcesInfo()`]: process.md#processgetactiveresourcesinfo
3440[`process.mainModule`]: process.md#processmainmodule
3441[`punycode`]: punycode.md
3442[`readable.readableEnded`]: stream.md#readablereadableended
3443[`request.abort()`]: http.md#requestabort
3444[`request.connection`]: http.md#requestconnection
3445[`request.destroy()`]: http.md#requestdestroyerror
3446[`request.socket`]: http.md#requestsocket
3447[`require.extensions`]: modules.md#requireextensions
3448[`require.main`]: modules.md#accessing-the-main-module
3449[`response.connection`]: http.md#responseconnection
3450[`response.end()`]: http.md#responseenddata-encoding-callback
3451[`response.finished`]: http.md#responsefinished
3452[`response.socket`]: http.md#responsesocket
3453[`response.writableEnded`]: http.md#responsewritableended
3454[`response.writableFinished`]: http.md#responsewritablefinished
3455[`script.createCachedData()`]: vm.md#scriptcreatecacheddata
3456[`setInterval()`]: timers.md#setintervalcallback-delay-args
3457[`setTimeout()`]: timers.md#settimeoutcallback-delay-args
3458[`socket.bufferSize`]: net.md#socketbuffersize
3459[`timeout.ref()`]: timers.md#timeoutref
3460[`timeout.refresh()`]: timers.md#timeoutrefresh
3461[`timeout.unref()`]: timers.md#timeoutunref
3462[`tls.CryptoStream`]: tls.md#class-tlscryptostream
3463[`tls.SecureContext`]: tls.md#tlscreatesecurecontextoptions
3464[`tls.SecurePair`]: tls.md#class-tlssecurepair
3465[`tls.TLSSocket`]: tls.md#class-tlstlssocket
3466[`tls.checkServerIdentity()`]: tls.md#tlscheckserveridentityhostname-cert
3467[`tls.createSecureContext()`]: tls.md#tlscreatesecurecontextoptions
3468[`url.format()`]: url.md#urlformaturlobject
3469[`url.parse()`]: url.md#urlparseurlstring-parsequerystring-slashesdenotehost
3470[`url.resolve()`]: url.md#urlresolvefrom-to
3471[`util._extend()`]: util.md#util_extendtarget-source
3472[`util.getSystemErrorName()`]: util.md#utilgetsystemerrornameerr
3473[`util.inspect()`]: util.md#utilinspectobject-options
3474[`util.inspect.custom`]: util.md#utilinspectcustom
3475[`util.isArray()`]: util.md#utilisarrayobject
3476[`util.isBoolean()`]: util.md#utilisbooleanobject
3477[`util.isBuffer()`]: util.md#utilisbufferobject
3478[`util.isDate()`]: util.md#utilisdateobject
3479[`util.isError()`]: util.md#utiliserrorobject
3480[`util.isFunction()`]: util.md#utilisfunctionobject
3481[`util.isNull()`]: util.md#utilisnullobject
3482[`util.isNullOrUndefined()`]: util.md#utilisnullorundefinedobject
3483[`util.isNumber()`]: util.md#utilisnumberobject
3484[`util.isObject()`]: util.md#utilisobjectobject
3485[`util.isPrimitive()`]: util.md#utilisprimitiveobject
3486[`util.isRegExp()`]: util.md#utilisregexpobject
3487[`util.isString()`]: util.md#utilisstringobject
3488[`util.isSymbol()`]: util.md#utilissymbolobject
3489[`util.isUndefined()`]: util.md#utilisundefinedobject
3490[`util.log()`]: util.md#utillogstring
3491[`util.types`]: util.md#utiltypes
3492[`util`]: util.md
3493[`worker.exitedAfterDisconnect`]: cluster.md#workerexitedafterdisconnect
3494[`worker.terminate()`]: worker_threads.md#workerterminate
3495[`writable.writableLength`]: stream.md#writablewritablelength
3496[`zlib.bytesWritten`]: zlib.md#zlibbyteswritten
3497[alloc]: buffer.md#static-method-bufferallocsize-fill-encoding
3498[alloc_unsafe_size]: buffer.md#static-method-bufferallocunsafesize
3499[from_arraybuffer]: buffer.md#static-method-bufferfromarraybuffer-byteoffset-length
3500[from_string_encoding]: buffer.md#static-method-bufferfromstring-encoding
3501[legacy URL API]: url.md#legacy-url-api
3502[legacy `urlObject`]: url.md#legacy-urlobject
3503[policies]: permissions.md#policies
3504[static methods of `crypto.Certificate()`]: crypto.md#class-certificate
3505[subpath exports]: packages.md#subpath-exports
3506[subpath imports]: packages.md#subpath-imports
3507[subpath patterns]: packages.md#subpath-patterns
3508