mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
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:
1 parent
1a5ab963b8
commit
cd68e35704
13 files changed
+81
-10
No files matched your search
@@ -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
|
||||
|
||||
@@ -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');
|
||||
@@ -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');
|
||||
@@ -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');
|
||||
@@ -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,5 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = require('internal/js_stream_socket');
|
||||
|
||||
process.emitWarning('The _stream_wrap module is deprecated.',
|
||||
'DeprecationWarning', 'DEP0125');
|
||||
@@ -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');
|
||||
File renamed without changes.
@@ -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');
|
||||
Reference in new issue
Block a user