diff options
author | Sam Roberts <vieuxtech@gmail.com> | 2019-02-21 10:42:04 -0800 |
---|---|---|
committer | Sam Roberts <vieuxtech@gmail.com> | 2019-03-04 10:27:50 -0800 |
commit | c7e628f8b3b6f2b7dcb2f3d70708454ee66cbf26 (patch) | |
tree | 23c14b8fa95b4519f64ecda5719b6a7e5dbdaeef | |
parent | 6593f7788b4740de3aa2482e02dfa336427f27c1 (diff) | |
download | android-node-v8-c7e628f8b3b6f2b7dcb2f3d70708454ee66cbf26.tar.gz android-node-v8-c7e628f8b3b6f2b7dcb2f3d70708454ee66cbf26.tar.bz2 android-node-v8-c7e628f8b3b6f2b7dcb2f3d70708454ee66cbf26.zip |
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>
-rw-r--r-- | doc/api/deprecations.md | 13 | ||||
-rw-r--r-- | lib/_stream_wrap.js | 2 | ||||
-rw-r--r-- | test/parallel/test-warn-stream-wrap.js | 10 |
3 files changed, 25 insertions, 0 deletions
diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index 60151401fb..dbd9e8648c 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -2349,6 +2349,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 diff --git a/lib/_stream_wrap.js b/lib/_stream_wrap.js index 5b5f476948..227548e59d 100644 --- a/lib/_stream_wrap.js +++ b/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'); diff --git a/test/parallel/test-warn-stream-wrap.js b/test/parallel/test-warn-stream-wrap.js new file mode 100644 index 0000000000..ffc2c510d0 --- /dev/null +++ b/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'); |