Skip to content

Commit c7e628f

Browse files
committed
lib: deprecate _stream_wrap
Its unused by node, and doesn't have a reasonable use outside of node. See: #25153 See: #16158 PR-URL: #26245 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
1 parent 6593f77 commit c7e628f

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed

doc/api/deprecations.md

+13
Original file line numberDiff line numberDiff line change
@@ -2349,6 +2349,19 @@ Type: Runtime
23492349
23502350
This property is a reference to the instance itself.
23512351
2352+
<a id="DEP0XXX"></a>
2353+
### DEP0XXX: require('\_stream\_wrap')
2354+
<!-- YAML
2355+
changes:
2356+
- version: REPLACEME
2357+
pr-url: https://github.com/nodejs/node/pull/26245
2358+
description: Runtime deprecation.
2359+
-->
2360+
2361+
Type: Runtime
2362+
2363+
The `_stream_wrap` module is deprecated.
2364+
23522365
[`--pending-deprecation`]: cli.html#cli_pending_deprecation
23532366
[`Buffer.allocUnsafeSlow(size)`]: buffer.html#buffer_class_method_buffer_allocunsafeslow_size
23542367
[`Buffer.from(array)`]: buffer.html#buffer_class_method_buffer_from_array

lib/_stream_wrap.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
'use strict';
22

33
module.exports = require('internal/js_stream_socket');
4+
process.emitWarning('The _stream_wrap module is deprecated.',
5+
'DeprecationWarning', 'DEP0XXX');
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
'use strict';
2+
3+
const common = require('../common');
4+
5+
// _stream_wrap is deprecated.
6+
7+
common.expectWarning('DeprecationWarning',
8+
'The _stream_wrap module is deprecated.', 'DEP0XXX');
9+
10+
require('_stream_wrap');

0 commit comments

Comments
 (0)