Skip to content

Commit a1fb336

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
1 parent 4afd503 commit a1fb336

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed

doc/api/deprecations.md

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

lib/_stream_wrap.js

Lines changed: 2 additions & 0 deletions
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');
Lines changed: 10 additions & 0 deletions
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)