lib: deprecate _stream_* modules

PR-URL: https://github.com/nodejs/node/pull/58337
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Mattias Buelens <mattias@buelens.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
This commit is contained in:
Dario Piotrowicz authored and GitHub committed 2025-05-23 13:48:24 +00:00
1 parent 1a5ab963b8
commit cd68e35704
13 files changed
+81 -10

No files matched your search

+15
View File
@@ -3920,6 +3920,21 @@ Type: Runtime
The `node:_tls_common` and `node:_tls_wrap` modules are deprecated as they should be considered
an internal nodejs implementation rather than a public facing API, use `node:tls` instead.
### DEP0193: `require('node:_stream_*')`
<!-- YAML
changes:
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/58337
description: Runtime deprecation.
-->
Type: Runtime
The `node:_stream_duplex`, `node:_stream_passthrough`, `node:_stream_readable`, `node:_stream_transform`,
`node:_stream_wrap` and `node:_stream_writable` modules are deprecated as they should be considered
an internal nodejs implementation rather than a public facing API, use `node:stream` instead.
[DEP0142]: #dep0142-repl_builtinlibs
[NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
[RFC 6066]: https://tools.ietf.org/html/rfc6066#section-3
+3 -2
View File
@@ -1,5 +1,6 @@
'use strict';
// Keep this file as an alias for the full stream module.
module.exports = require('stream').Duplex;
process.emitWarning('The _stream_duplex module is deprecated.',
'DeprecationWarning', 'DEP0193');
+3 -2
View File
@@ -1,5 +1,6 @@
'use strict';
// Keep this file as an alias for the full stream module.
module.exports = require('stream').PassThrough;
process.emitWarning('The _stream_passthrough module is deprecated.',
'DeprecationWarning', 'DEP0193');
+3 -2
View File
@@ -1,5 +1,6 @@
'use strict';
// Keep this file as an alias for the full stream module.
module.exports = require('stream').Readable;
process.emitWarning('The _stream_readable module is deprecated.',
'DeprecationWarning', 'DEP0193');
+3 -2
View File
@@ -1,5 +1,6 @@
'use strict';
// Keep this file as an alias for the full stream module.
module.exports = require('stream').Transform;
process.emitWarning('The _stream_transform module is deprecated.',
'DeprecationWarning', 'DEP0193');
+1
View File
@@ -1,5 +1,6 @@
'use strict';
module.exports = require('internal/js_stream_socket');
process.emitWarning('The _stream_wrap module is deprecated.',
'DeprecationWarning', 'DEP0125');
+3 -2
View File
@@ -1,5 +1,6 @@
'use strict';
// Keep this file as an alias for the full stream module.
module.exports = require('stream').Writable;
process.emitWarning('The _stream_writable module is deprecated.',
'DeprecationWarning', 'DEP0193');
@@ -0,0 +1,10 @@
'use strict';
const common = require('../common');
// _stream_duplex is deprecated.
common.expectWarning('DeprecationWarning',
'The _stream_duplex module is deprecated.', 'DEP0193');
require('_stream_duplex');
@@ -0,0 +1,10 @@
'use strict';
const common = require('../common');
// _stream_passthrough is deprecated.
common.expectWarning('DeprecationWarning',
'The _stream_passthrough module is deprecated.', 'DEP0193');
require('_stream_passthrough');
@@ -0,0 +1,10 @@
'use strict';
const common = require('../common');
// _stream_readable is deprecated.
common.expectWarning('DeprecationWarning',
'The _stream_readable module is deprecated.', 'DEP0193');
require('_stream_readable');
@@ -0,0 +1,10 @@
'use strict';
const common = require('../common');
// _stream_transform is deprecated.
common.expectWarning('DeprecationWarning',
'The _stream_transform module is deprecated.', 'DEP0193');
require('_stream_transform');
@@ -0,0 +1,10 @@
'use strict';
const common = require('../common');
// _stream_writable is deprecated.
common.expectWarning('DeprecationWarning',
'The _stream_writable module is deprecated.', 'DEP0193');
require('_stream_writable');