Skip to content

Commit

Permalink
lib: deprecate _stream_wrap
Browse files Browse the repository at this point in the history
Its unused by node, and doesn't have a reasonable use outside of node.

See: #25153
See: #16158
  • Loading branch information
sam-github committed Mar 2, 2019
1 parent 4afd503 commit a1fb336
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
13 changes: 13 additions & 0 deletions doc/api/deprecations.md
Expand Up @@ -2348,6 +2348,19 @@ Type: Runtime
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
[`Buffer.allocUnsafeSlow(size)`]: buffer.html#buffer_class_method_buffer_allocunsafeslow_size
[`Buffer.from(array)`]: buffer.html#buffer_class_method_buffer_from_array
Expand Down
2 changes: 2 additions & 0 deletions lib/_stream_wrap.js
@@ -1,3 +1,5 @@
'use strict';

module.exports = require('internal/js_stream_socket');
process.emitWarning('The _stream_wrap module is deprecated.',
'DeprecationWarning', 'DEP0XXX');
10 changes: 10 additions & 0 deletions test/parallel/test-warn-stream-wrap.js
@@ -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');

0 comments on commit a1fb336

Please sign in to comment.