lib: deprecate _stream_wrap
Its unused by node, and doesn't have a reasonable use outside of node. See: https://github.com/nodejs/node/pull/25153 See: https://github.com/nodejs/node/pull/16158 PR-URL: https://github.com/nodejs/node/pull/26245 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
This commit is contained in:
parent
6593f7788b
commit
c7e628f8b3
@ -2349,6 +2349,19 @@ Type: Runtime
|
|||||||
|
|
||||||
This property is a reference to the instance itself.
|
This property is a reference to the instance itself.
|
||||||
|
|
||||||
|
<a id="DEP0XXX"></a>
|
||||||
|
### DEP0XXX: require('\_stream\_wrap')
|
||||||
|
<!-- YAML
|
||||||
|
changes:
|
||||||
|
- version: REPLACEME
|
||||||
|
pr-url: https://github.com/nodejs/node/pull/26245
|
||||||
|
description: Runtime deprecation.
|
||||||
|
-->
|
||||||
|
|
||||||
|
Type: Runtime
|
||||||
|
|
||||||
|
The `_stream_wrap` module is deprecated.
|
||||||
|
|
||||||
[`--pending-deprecation`]: cli.html#cli_pending_deprecation
|
[`--pending-deprecation`]: cli.html#cli_pending_deprecation
|
||||||
[`Buffer.allocUnsafeSlow(size)`]: buffer.html#buffer_class_method_buffer_allocunsafeslow_size
|
[`Buffer.allocUnsafeSlow(size)`]: buffer.html#buffer_class_method_buffer_allocunsafeslow_size
|
||||||
[`Buffer.from(array)`]: buffer.html#buffer_class_method_buffer_from_array
|
[`Buffer.from(array)`]: buffer.html#buffer_class_method_buffer_from_array
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
module.exports = require('internal/js_stream_socket');
|
module.exports = require('internal/js_stream_socket');
|
||||||
|
process.emitWarning('The _stream_wrap module is deprecated.',
|
||||||
|
'DeprecationWarning', 'DEP0XXX');
|
||||||
|
10
test/parallel/test-warn-stream-wrap.js
Normal file
10
test/parallel/test-warn-stream-wrap.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
const common = require('../common');
|
||||||
|
|
||||||
|
// _stream_wrap is deprecated.
|
||||||
|
|
||||||
|
common.expectWarning('DeprecationWarning',
|
||||||
|
'The _stream_wrap module is deprecated.', 'DEP0XXX');
|
||||||
|
|
||||||
|
require('_stream_wrap');
|
Loading…
x
Reference in New Issue
Block a user