-
Notifications
You must be signed in to change notification settings - Fork 30k
/
deprecations.md
3591 lines (2837 loc) Β· 101 KB
/
deprecations.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Deprecated APIs
<!--introduced_in=v7.7.0-->
<!-- type=misc -->
Node.js APIs might be deprecated for any of the following reasons:
* Use of the API is unsafe.
* An improved alternative API is available.
* Breaking changes to the API are expected in a future major release.
Node.js uses three kinds of Deprecations:
* Documentation-only
* Runtime
* End-of-Life
A Documentation-only deprecation is one that is expressed only within the
Node.js API docs. These generate no side-effects while running Node.js.
Some Documentation-only deprecations trigger a runtime warning when launched
with [`--pending-deprecation`][] flag (or its alternative,
`NODE_PENDING_DEPRECATION=1` environment variable), similarly to Runtime
deprecations below. Documentation-only deprecations that support that flag
are explicitly labeled as such in the
[list of Deprecated APIs](#list-of-deprecated-apis).
A Runtime deprecation will, by default, generate a process warning that will
be printed to `stderr` the first time the deprecated API is used. When the
[`--throw-deprecation`][] command-line flag is used, a Runtime deprecation will
cause an error to be thrown.
An End-of-Life deprecation is used when functionality is or will soon be removed
from Node.js.
## Revoking deprecations
Occasionally, the deprecation of an API might be reversed. In such situations,
this document will be updated with information relevant to the decision.
However, the deprecation identifier will not be modified.
## List of deprecated APIs
### DEP0001: `http.OutgoingMessage.prototype.flush`
<!-- YAML
changes:
- version: v14.0.0
pr-url: https://github.com/nodejs/node/pull/31164
description: End-of-Life.
- version:
- v6.12.0
- v4.8.6
pr-url: https://github.com/nodejs/node/pull/10116
description: A deprecation code has been assigned.
- version: v1.6.0
pr-url: https://github.com/nodejs/node/pull/1156
description: Runtime deprecation.
-->
Type: End-of-Life
`OutgoingMessage.prototype.flush()` has been removed. Use
`OutgoingMessage.prototype.flushHeaders()` instead.
### DEP0002: `require('_linklist')`
<!-- YAML
changes:
- version: v8.0.0
pr-url: https://github.com/nodejs/node/pull/12113
description: End-of-Life.
- version: v6.12.0
pr-url: https://github.com/nodejs/node/pull/10116
description: A deprecation code has been assigned.
- version: v5.0.0
pr-url: https://github.com/nodejs/node/pull/3078
description: Runtime deprecation.
-->
Type: End-of-Life
The `_linklist` module is deprecated. Please use a userland alternative.
### DEP0003: `_writableState.buffer`
<!-- YAML
changes:
- version: v14.0.0
pr-url: https://github.com/nodejs/node/pull/31165
description: End-of-Life.
- version:
- v6.12.0
- v4.8.6
pr-url: https://github.com/nodejs/node/pull/10116
description: A deprecation code has been assigned.
- version: v0.11.15
pr-url: https://github.com/nodejs/node-v0.x-archive/pull/8826
description: Runtime deprecation.
-->
Type: End-of-Life
The `_writableState.buffer` has been removed. Use `_writableState.getBuffer()`
instead.
### DEP0004: `CryptoStream.prototype.readyState`
<!-- YAML
changes:
- version: v10.0.0
pr-url: https://github.com/nodejs/node/pull/17882
description: End-of-Life.
- version:
- v6.12.0
- v4.8.6
pr-url: https://github.com/nodejs/node/pull/10116
description: A deprecation code has been assigned.
- version: v0.4.0
commit: 9c7f89bf56abd37a796fea621ad2e47dd33d2b82
description: Documentation-only deprecation.
-->
Type: End-of-Life
The `CryptoStream.prototype.readyState` property was removed.
### DEP0005: `Buffer()` constructor
<!-- YAML
changes:
- version: v10.0.0
pr-url: https://github.com/nodejs/node/pull/19524
description: Runtime deprecation.
- version: v6.12.0
pr-url: https://github.com/nodejs/node/pull/10116
description: A deprecation code has been assigned.
- version: v6.0.0
pr-url: https://github.com/nodejs/node/pull/4682
description: Documentation-only deprecation.
-->
Type: Runtime (supports [`--pending-deprecation`][])
The `Buffer()` function and `new Buffer()` constructor are deprecated due to
API usability issues that can lead to accidental security issues.
As an alternative, use one of the following methods of constructing `Buffer`
objects:
* [`Buffer.alloc(size[, fill[, encoding]])`][alloc]: Create a `Buffer` with
_initialized_ memory.
* [`Buffer.allocUnsafe(size)`][alloc_unsafe_size]: Create a `Buffer` with
_uninitialized_ memory.
* [`Buffer.allocUnsafeSlow(size)`][]: Create a `Buffer` with _uninitialized_
memory.
* [`Buffer.from(array)`][]: Create a `Buffer` with a copy of `array`
* [`Buffer.from(arrayBuffer[, byteOffset[, length]])`][from_arraybuffer] -
Create a `Buffer` that wraps the given `arrayBuffer`.
* [`Buffer.from(buffer)`][]: Create a `Buffer` that copies `buffer`.
* [`Buffer.from(string[, encoding])`][from_string_encoding]: Create a `Buffer`
that copies `string`.
Without `--pending-deprecation`, runtime warnings occur only for code not in
`node_modules`. This means there will not be deprecation warnings for
`Buffer()` usage in dependencies. With `--pending-deprecation`, a runtime
warning results no matter where the `Buffer()` usage occurs.
### DEP0006: `child_process` `options.customFds`
<!-- YAML
changes:
- version: v12.0.0
pr-url: https://github.com/nodejs/node/pull/25279
description: End-of-Life.
- version:
- v6.12.0
- v4.8.6
pr-url: https://github.com/nodejs/node/pull/10116
description: A deprecation code has been assigned.
- version: v0.11.14
description: Runtime deprecation.
- version: v0.5.10
description: Documentation-only deprecation.
-->
Type: End-of-Life
Within the [`child_process`][] module's `spawn()`, `fork()`, and `exec()`
methods, the `options.customFds` option is deprecated. The `options.stdio`
option should be used instead.
### DEP0007: Replace `cluster` `worker.suicide` with `worker.exitedAfterDisconnect`
<!-- YAML
changes:
- version: v9.0.0
pr-url: https://github.com/nodejs/node/pull/13702
description: End-of-Life.
- version: v7.0.0
pr-url: https://github.com/nodejs/node/pull/3747
description: Runtime deprecation.
- version: v6.12.0
pr-url: https://github.com/nodejs/node/pull/10116
description: A deprecation code has been assigned.
- version: v6.0.0
pr-url: https://github.com/nodejs/node/pull/3743
description: Documentation-only deprecation.
-->
Type: End-of-Life
In an earlier version of the Node.js `cluster`, a boolean property with the name
`suicide` was added to the `Worker` object. The intent of this property was to
provide an indication of how and why the `Worker` instance exited. In Node.js
6.0.0, the old property was deprecated and replaced with a new
[`worker.exitedAfterDisconnect`][] property. The old property name did not
precisely describe the actual semantics and was unnecessarily emotion-laden.
### DEP0008: `require('node:constants')`
<!-- YAML
changes:
- version: v6.12.0
pr-url: https://github.com/nodejs/node/pull/10116
description: A deprecation code has been assigned.
- version: v6.3.0
pr-url: https://github.com/nodejs/node/pull/6534
description: Documentation-only deprecation.
-->
Type: Documentation-only
The `node:constants` module is deprecated. When requiring access to constants
relevant to specific Node.js builtin modules, developers should instead refer
to the `constants` property exposed by the relevant module. For instance,
`require('node:fs').constants` and `require('node:os').constants`.
### DEP0009: `crypto.pbkdf2` without digest
<!-- YAML
changes:
- version: v14.0.0
pr-url: https://github.com/nodejs/node/pull/31166
description: End-of-Life (for `digest === null`).
- version: v11.0.0
pr-url: https://github.com/nodejs/node/pull/22861
description: Runtime deprecation (for `digest === null`).
- version: v8.0.0
pr-url: https://github.com/nodejs/node/pull/11305
description: End-of-Life (for `digest === undefined`).
- version: v6.12.0
pr-url: https://github.com/nodejs/node/pull/10116
description: A deprecation code has been assigned.
- version: v6.0.0
pr-url: https://github.com/nodejs/node/pull/4047
description: Runtime deprecation (for `digest === undefined`).
-->
Type: End-of-Life
Use of the [`crypto.pbkdf2()`][] API without specifying a digest was deprecated
in Node.js 6.0 because the method defaulted to using the non-recommended
`'SHA1'` digest. Previously, a deprecation warning was printed. Starting in
Node.js 8.0.0, calling `crypto.pbkdf2()` or `crypto.pbkdf2Sync()` with
`digest` set to `undefined` will throw a `TypeError`.
Beginning in Node.js v11.0.0, calling these functions with `digest` set to
`null` would print a deprecation warning to align with the behavior when `digest`
is `undefined`.
Now, however, passing either `undefined` or `null` will throw a `TypeError`.
### DEP0010: `crypto.createCredentials`
<!-- YAML
changes:
- version: v11.0.0
pr-url: https://github.com/nodejs/node/pull/21153
description: End-of-Life.
- version:
- v6.12.0
- v4.8.6
pr-url: https://github.com/nodejs/node/pull/10116
description: A deprecation code has been assigned.
- version: v0.11.13
pr-url: https://github.com/nodejs/node-v0.x-archive/pull/7265
description: Runtime deprecation.
-->
Type: End-of-Life
The `crypto.createCredentials()` API was removed. Please use
[`tls.createSecureContext()`][] instead.
### DEP0011: `crypto.Credentials`
<!-- YAML
changes:
- version: v11.0.0
pr-url: https://github.com/nodejs/node/pull/21153
description: End-of-Life.
- version:
- v6.12.0
- v4.8.6
pr-url: https://github.com/nodejs/node/pull/10116
description: A deprecation code has been assigned.
- version: v0.11.13
pr-url: https://github.com/nodejs/node-v0.x-archive/pull/7265
description: Runtime deprecation.
-->
Type: End-of-Life
The `crypto.Credentials` class was removed. Please use [`tls.SecureContext`][]
instead.
### DEP0012: `Domain.dispose`
<!-- YAML
changes:
- version: v9.0.0
pr-url: https://github.com/nodejs/node/pull/15412
description: End-of-Life.
- version:
- v6.12.0
- v4.8.6
pr-url: https://github.com/nodejs/node/pull/10116
description: A deprecation code has been assigned.
- version: v0.11.7
pr-url: https://github.com/nodejs/node-v0.x-archive/pull/5021
description: Runtime deprecation.
-->
Type: End-of-Life
`Domain.dispose()` has been removed. Recover from failed I/O actions
explicitly via error event handlers set on the domain instead.
### DEP0013: `fs` asynchronous function without callback
<!-- YAML
changes:
- version: v10.0.0
pr-url: https://github.com/nodejs/node/pull/18668
description: End-of-Life.
- version: v7.0.0
pr-url: https://github.com/nodejs/node/pull/7897
description: Runtime deprecation.
-->
Type: End-of-Life
Calling an asynchronous function without a callback throws a `TypeError`
in Node.js 10.0.0 onwards. See <https://github.com/nodejs/node/pull/12562>.
### DEP0014: `fs.read` legacy String interface
<!-- YAML
changes:
- version: v8.0.0
pr-url: https://github.com/nodejs/node/pull/9683
description: End-of-Life.
- version:
- v6.12.0
- v4.8.6
pr-url: https://github.com/nodejs/node/pull/10116
description: A deprecation code has been assigned.
- version: v6.0.0
pr-url: https://github.com/nodejs/node/pull/4525
description: Runtime deprecation.
- version: v0.1.96
commit: c93e0aaf062081db3ec40ac45b3e2c979d5759d6
description: Documentation-only deprecation.
-->
Type: End-of-Life
The [`fs.read()`][] legacy `String` interface is deprecated. Use the `Buffer`
API as mentioned in the documentation instead.
### DEP0015: `fs.readSync` legacy String interface
<!-- YAML
changes:
- version: v8.0.0
pr-url: https://github.com/nodejs/node/pull/9683
description: End-of-Life.
- version:
- v6.12.0
- v4.8.6
pr-url: https://github.com/nodejs/node/pull/10116
description: A deprecation code has been assigned.
- version: v6.0.0
pr-url: https://github.com/nodejs/node/pull/4525
description: Runtime deprecation.
- version: v0.1.96
commit: c93e0aaf062081db3ec40ac45b3e2c979d5759d6
description: Documentation-only deprecation.
-->
Type: End-of-Life
The [`fs.readSync()`][] legacy `String` interface is deprecated. Use the
`Buffer` API as mentioned in the documentation instead.
### DEP0016: `GLOBAL`/`root`
<!-- YAML
changes:
- version: v14.0.0
pr-url: https://github.com/nodejs/node/pull/31167
description: End-of-Life.
- version: v6.12.0
pr-url: https://github.com/nodejs/node/pull/10116
description: A deprecation code has been assigned.
- version: v6.0.0
pr-url: https://github.com/nodejs/node/pull/1838
description: Runtime deprecation.
-->
Type: End-of-Life
The `GLOBAL` and `root` aliases for the `global` property were deprecated
in Node.js 6.0.0 and have since been removed.
### DEP0017: `Intl.v8BreakIterator`
<!-- YAML
changes:
- version: v9.0.0
pr-url: https://github.com/nodejs/node/pull/15238
description: End-of-Life.
- version: v7.0.0
pr-url: https://github.com/nodejs/node/pull/8908
description: Runtime deprecation.
-->
Type: End-of-Life
`Intl.v8BreakIterator` was a non-standard extension and has been removed.
See [`Intl.Segmenter`](https://github.com/tc39/proposal-intl-segmenter).
### DEP0018: Unhandled promise rejections
<!-- YAML
changes:
- version: v15.0.0
pr-url: https://github.com/nodejs/node/pull/35316
description: End-of-Life.
- version: v7.0.0
pr-url: https://github.com/nodejs/node/pull/8217
description: Runtime deprecation.
-->
Type: End-of-Life
Unhandled promise rejections are deprecated. By default, promise rejections
that are not handled terminate the Node.js process with a non-zero exit
code. To change the way Node.js treats unhandled rejections, use the
[`--unhandled-rejections`][] command-line option.
### DEP0019: `require('.')` resolved outside directory
<!-- YAML
changes:
- version: v12.0.0
pr-url: https://github.com/nodejs/node/pull/26973
description: Removed functionality.
- version:
- v6.12.0
- v4.8.6
pr-url: https://github.com/nodejs/node/pull/10116
description: A deprecation code has been assigned.
- version: v1.8.1
pr-url: https://github.com/nodejs/node/pull/1363
description: Runtime deprecation.
-->
Type: End-of-Life
In certain cases, `require('.')` could resolve outside the package directory.
This behavior has been removed.
### DEP0020: `Server.connections`
<!-- YAML
changes:
- version: v15.0.0
pr-url: https://github.com/nodejs/node/pull/33647
description: Server.connections has been removed.
- version:
- v6.12.0
- v4.8.6
pr-url: https://github.com/nodejs/node/pull/10116
description: A deprecation code has been assigned.
- version: v0.9.7
pr-url: https://github.com/nodejs/node-v0.x-archive/pull/4595
description: Runtime deprecation.
-->
Type: End-of-Life
The `Server.connections` property was deprecated in Node.js v0.9.7 and has
been removed. Please use the [`Server.getConnections()`][] method instead.
### DEP0021: `Server.listenFD`
<!-- YAML
changes:
- version: v12.0.0
pr-url: https://github.com/nodejs/node/pull/27127
description: End-of-Life.
- version:
- v6.12.0
- v4.8.6
pr-url: https://github.com/nodejs/node/pull/10116
description: A deprecation code has been assigned.
- version: v0.7.12
commit: 41421ff9da1288aa241a5e9dcf915b685ade1c23
description: Runtime deprecation.
-->
Type: End-of-Life
The `Server.listenFD()` method was deprecated and removed. Please use
[`Server.listen({fd: <number>})`][] instead.
### DEP0022: `os.tmpDir()`
<!-- YAML
changes:
- version: v14.0.0
pr-url: https://github.com/nodejs/node/pull/31169
description: End-of-Life.
- version: v7.0.0
pr-url: https://github.com/nodejs/node/pull/6739
description: Runtime deprecation.
-->
Type: End-of-Life
The `os.tmpDir()` API was deprecated in Node.js 7.0.0 and has since been
removed. Please use [`os.tmpdir()`][] instead.
### DEP0023: `os.getNetworkInterfaces()`
<!-- YAML
changes:
- version: v12.0.0
pr-url: https://github.com/nodejs/node/pull/25280
description: End-of-Life.
- version:
- v6.12.0
- v4.8.6
pr-url: https://github.com/nodejs/node/pull/10116
description: A deprecation code has been assigned.
- version: v0.6.0
commit: 37bb37d151fb6ee4696730e63ff28bb7a4924f97
description: Runtime deprecation.
-->
Type: End-of-Life
The `os.getNetworkInterfaces()` method is deprecated. Please use the
[`os.networkInterfaces()`][] method instead.
### DEP0024: `REPLServer.prototype.convertToContext()`
<!-- YAML
changes:
- version: v9.0.0
pr-url: https://github.com/nodejs/node/pull/13434
description: End-of-Life.
- version: v7.0.0
pr-url: https://github.com/nodejs/node/pull/7829
description: Runtime deprecation.
-->
Type: End-of-Life
The `REPLServer.prototype.convertToContext()` API has been removed.
### DEP0025: `require('node:sys')`
<!-- YAML
changes:
- version:
- v6.12.0
- v4.8.6
pr-url: https://github.com/nodejs/node/pull/10116
description: A deprecation code has been assigned.
- version: v1.0.0
pr-url: https://github.com/nodejs/node/pull/317
description: Runtime deprecation.
-->
Type: Runtime
The `node:sys` module is deprecated. Please use the [`util`][] module instead.
### DEP0026: `util.print()`
<!-- YAML
changes:
- version: v12.0.0
pr-url: https://github.com/nodejs/node/pull/25377
description: End-of-Life.
- version:
- v6.12.0
- v4.8.6
pr-url: https://github.com/nodejs/node/pull/10116
description: A deprecation code has been assigned.
- version: v0.11.3
commit: 896b2aa7074fc886efd7dd0a397d694763cac7ce
description: Runtime deprecation.
-->
Type: End-of-Life
`util.print()` has been removed. Please use [`console.log()`][] instead.
### DEP0027: `util.puts()`
<!-- YAML
changes:
- version: v12.0.0
pr-url: https://github.com/nodejs/node/pull/25377
description: End-of-Life.
- version:
- v6.12.0
- v4.8.6
pr-url: https://github.com/nodejs/node/pull/10116
description: A deprecation code has been assigned.
- version: v0.11.3
commit: 896b2aa7074fc886efd7dd0a397d694763cac7ce
description: Runtime deprecation.
-->
Type: End-of-Life
`util.puts()` has been removed. Please use [`console.log()`][] instead.
### DEP0028: `util.debug()`
<!-- YAML
changes:
- version: v12.0.0
pr-url: https://github.com/nodejs/node/pull/25377
description: End-of-Life.
- version:
- v6.12.0
- v4.8.6
pr-url: https://github.com/nodejs/node/pull/10116
description: A deprecation code has been assigned.
- version: v0.11.3
commit: 896b2aa7074fc886efd7dd0a397d694763cac7ce
description: Runtime deprecation.
-->
Type: End-of-Life
`util.debug()` has been removed. Please use [`console.error()`][] instead.
### DEP0029: `util.error()`
<!-- YAML
changes:
- version: v12.0.0
pr-url: https://github.com/nodejs/node/pull/25377
description: End-of-Life.
- version:
- v6.12.0
- v4.8.6
pr-url: https://github.com/nodejs/node/pull/10116
description: A deprecation code has been assigned.
- version: v0.11.3
commit: 896b2aa7074fc886efd7dd0a397d694763cac7ce
description: Runtime deprecation.
-->
Type: End-of-Life
`util.error()` has been removed. Please use [`console.error()`][] instead.
### DEP0030: `SlowBuffer`
<!-- YAML
changes:
- version: v6.12.0
pr-url: https://github.com/nodejs/node/pull/10116
description: A deprecation code has been assigned.
- version: v6.0.0
pr-url: https://github.com/nodejs/node/pull/5833
description: Documentation-only deprecation.
-->
Type: Documentation-only
The [`SlowBuffer`][] class is deprecated. Please use
[`Buffer.allocUnsafeSlow(size)`][] instead.
### DEP0031: `ecdh.setPublicKey()`
<!-- YAML
changes:
- version: v6.12.0
pr-url: https://github.com/nodejs/node/pull/10116
description: A deprecation code has been assigned.
- version: v5.2.0
pr-url: https://github.com/nodejs/node/pull/3511
description: Documentation-only deprecation.
-->
Type: Documentation-only
The [`ecdh.setPublicKey()`][] method is now deprecated as its inclusion in the
API is not useful.
### DEP0032: `node:domain` module
<!-- YAML
changes:
- version:
- v6.12.0
- v4.8.6
pr-url: https://github.com/nodejs/node/pull/10116
description: A deprecation code has been assigned.
- version: v1.4.2
pr-url: https://github.com/nodejs/node/pull/943
description: Documentation-only deprecation.
-->
Type: Documentation-only
The [`domain`][] module is deprecated and should not be used.
### DEP0033: `EventEmitter.listenerCount()`
<!-- YAML
changes:
- version:
- v6.12.0
- v4.8.6
pr-url: https://github.com/nodejs/node/pull/10116
description: A deprecation code has been assigned.
- version: v3.2.0
pr-url: https://github.com/nodejs/node/pull/2349
description: Documentation-only deprecation.
-->
Type: Documentation-only
The [`events.listenerCount(emitter, eventName)`][] API is
deprecated. Please use [`emitter.listenerCount(eventName)`][] instead.
### DEP0034: `fs.exists(path, callback)`
<!-- YAML
changes:
- version:
- v6.12.0
- v4.8.6
pr-url: https://github.com/nodejs/node/pull/10116
description: A deprecation code has been assigned.
- version: v1.0.0
pr-url: https://github.com/nodejs/node/pull/166
description: Documentation-only deprecation.
-->
Type: Documentation-only
The [`fs.exists(path, callback)`][] API is deprecated. Please use
[`fs.stat()`][] or [`fs.access()`][] instead.
### DEP0035: `fs.lchmod(path, mode, callback)`
<!-- YAML
changes:
- version:
- v6.12.0
- v4.8.6
pr-url: https://github.com/nodejs/node/pull/10116
description: A deprecation code has been assigned.
- version: v0.4.7
description: Documentation-only deprecation.
-->
Type: Documentation-only
The [`fs.lchmod(path, mode, callback)`][] API is deprecated.
### DEP0036: `fs.lchmodSync(path, mode)`
<!-- YAML
changes:
- version:
- v6.12.0
- v4.8.6
pr-url: https://github.com/nodejs/node/pull/10116
description: A deprecation code has been assigned.
- version: v0.4.7
description: Documentation-only deprecation.
-->
Type: Documentation-only
The [`fs.lchmodSync(path, mode)`][] API is deprecated.
### DEP0037: `fs.lchown(path, uid, gid, callback)`
<!-- YAML
changes:
- version: v10.6.0
pr-url: https://github.com/nodejs/node/pull/21498
description: Deprecation revoked.
- version:
- v6.12.0
- v4.8.6
pr-url: https://github.com/nodejs/node/pull/10116
description: A deprecation code has been assigned.
- version: v0.4.7
description: Documentation-only deprecation.
-->
Type: Deprecation revoked
The [`fs.lchown(path, uid, gid, callback)`][] API was deprecated. The
deprecation was revoked because the requisite supporting APIs were added in
libuv.
### DEP0038: `fs.lchownSync(path, uid, gid)`
<!-- YAML
changes:
- version: v10.6.0
pr-url: https://github.com/nodejs/node/pull/21498
description: Deprecation revoked.
- version:
- v6.12.0
- v4.8.6
pr-url: https://github.com/nodejs/node/pull/10116
description: A deprecation code has been assigned.
- version: v0.4.7
description: Documentation-only deprecation.
-->
Type: Deprecation revoked
The [`fs.lchownSync(path, uid, gid)`][] API was deprecated. The deprecation was
revoked because the requisite supporting APIs were added in libuv.
### DEP0039: `require.extensions`
<!-- YAML
changes:
- version:
- v6.12.0
- v4.8.6
pr-url: https://github.com/nodejs/node/pull/10116
description: A deprecation code has been assigned.
- version: v0.10.6
commit: 7bd8a5a2a60b75266f89f9a32877d55294a3881c
description: Documentation-only deprecation.
-->
Type: Documentation-only
The [`require.extensions`][] property is deprecated.
### DEP0040: `node:punycode` module
<!-- YAML
changes:
- version: v21.0.0
pr-url: https://github.com/nodejs/node/pull/47202
description: Runtime deprecation.
- version: v16.6.0
pr-url: https://github.com/nodejs/node/pull/38444
description: Added support for `--pending-deprecation`.
- version: v7.0.0
pr-url: https://github.com/nodejs/node/pull/7941
description: Documentation-only deprecation.
-->
Type: Runtime
The [`punycode`][] module is deprecated. Please use a userland alternative
instead.
### DEP0041: `NODE_REPL_HISTORY_FILE` environment variable
<!-- YAML
changes:
- version: v10.0.0
pr-url: https://github.com/nodejs/node/pull/13876
description: End-of-Life.
- version:
- v6.12.0
- v4.8.6
pr-url: https://github.com/nodejs/node/pull/10116
description: A deprecation code has been assigned.
- version: v3.0.0
pr-url: https://github.com/nodejs/node/pull/2224
description: Documentation-only deprecation.
-->
Type: End-of-Life
The `NODE_REPL_HISTORY_FILE` environment variable was removed. Please use
`NODE_REPL_HISTORY` instead.
### DEP0042: `tls.CryptoStream`
<!-- YAML
changes:
- version: v10.0.0
pr-url: https://github.com/nodejs/node/pull/17882
description: End-of-Life.
- version:
- v6.12.0
- v4.8.6
pr-url: https://github.com/nodejs/node/pull/10116
description: A deprecation code has been assigned.
- version: v0.11.3
commit: af80e7bc6e6f33c582eb1f7d37c7f5bbe9f910f7
description: Documentation-only deprecation.
-->
Type: End-of-Life
The [`tls.CryptoStream`][] class was removed. Please use
[`tls.TLSSocket`][] instead.
### DEP0043: `tls.SecurePair`
<!-- YAML
changes:
- version: v8.0.0
pr-url: https://github.com/nodejs/node/pull/11349
description: Runtime deprecation.
- version: v6.12.0
pr-url: https://github.com/nodejs/node/pull/10116
description: A deprecation code has been assigned.
- version: v6.0.0
pr-url: https://github.com/nodejs/node/pull/6063
description: Documentation-only deprecation.
- version: v0.11.15
pr-url:
- https://github.com/nodejs/node-v0.x-archive/pull/8695
- https://github.com/nodejs/node-v0.x-archive/pull/8700
description: Deprecation revoked.
- version: v0.11.3
commit: af80e7bc6e6f33c582eb1f7d37c7f5bbe9f910f7
description: Runtime deprecation.
-->
Type: Documentation-only
The [`tls.SecurePair`][] class is deprecated. Please use
[`tls.TLSSocket`][] instead.
### DEP0044: `util.isArray()`
<!-- YAML
changes:
- version:
- v6.12.0
- v4.8.6
pr-url: https://github.com/nodejs/node/pull/10116
description: A deprecation code has been assigned.
- version:
- v4.0.0
- v3.3.1
pr-url: https://github.com/nodejs/node/pull/2447
description: Documentation-only deprecation.
-->
Type: Documentation-only
The [`util.isArray()`][] API is deprecated. Please use `Array.isArray()`
instead.
### DEP0045: `util.isBoolean()`
<!-- YAML
changes:
- version:
- v6.12.0
- v4.8.6
pr-url: https://github.com/nodejs/node/pull/10116
description: A deprecation code has been assigned.
- version:
- v4.0.0
- v3.3.1
pr-url: https://github.com/nodejs/node/pull/2447
description: Documentation-only deprecation.
-->
Type: Documentation-only