lib: add module to use in module deprecation warnings

PR-URL: https://github.com/nodejs/node/pull/58442
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
This commit is contained in:
Dario Piotrowicz 2025-05-23 23:03:02 +01:00 committed by Node.js GitHub Bot
parent d3bc4549ec
commit d5abfbf582
16 changed files with 16 additions and 16 deletions

View File

@ -2,5 +2,5 @@
module.exports = require('stream').Duplex;
process.emitWarning('The _stream_duplex module is deprecated.',
process.emitWarning('The _stream_duplex module is deprecated. Use `node:stream` instead.',
'DeprecationWarning', 'DEP0193');

View File

@ -2,5 +2,5 @@
module.exports = require('stream').PassThrough;
process.emitWarning('The _stream_passthrough module is deprecated.',
process.emitWarning('The _stream_passthrough module is deprecated. Use `node:stream` instead.',
'DeprecationWarning', 'DEP0193');

View File

@ -2,5 +2,5 @@
module.exports = require('stream').Readable;
process.emitWarning('The _stream_readable module is deprecated.',
process.emitWarning('The _stream_readable module is deprecated. Use `node:stream` instead.',
'DeprecationWarning', 'DEP0193');

View File

@ -2,5 +2,5 @@
module.exports = require('stream').Transform;
process.emitWarning('The _stream_transform module is deprecated.',
process.emitWarning('The _stream_transform module is deprecated. Use `node:stream` instead.',
'DeprecationWarning', 'DEP0193');

View File

@ -2,5 +2,5 @@
module.exports = require('internal/js_stream_socket');
process.emitWarning('The _stream_wrap module is deprecated.',
process.emitWarning('The _stream_wrap module is deprecated. Use `node:stream` instead.',
'DeprecationWarning', 'DEP0125');

View File

@ -2,5 +2,5 @@
module.exports = require('stream').Writable;
process.emitWarning('The _stream_writable module is deprecated.',
process.emitWarning('The _stream_writable module is deprecated. Use `node:stream` instead.',
'DeprecationWarning', 'DEP0193');

View File

@ -6,5 +6,5 @@ module.exports = {
createSecureContext,
translatePeerCertificate,
};
process.emitWarning('The _tls_common module is deprecated.',
process.emitWarning('The _tls_common module is deprecated. Use `node:tls` instead.',
'DeprecationWarning', 'DEP0192');

View File

@ -7,5 +7,5 @@ module.exports = {
createServer,
connect,
};
process.emitWarning('The _tls_wrap module is deprecated.',
process.emitWarning('The _tls_wrap module is deprecated. Use `node:tls` instead.',
'DeprecationWarning', 'DEP0192');

View File

@ -5,6 +5,6 @@ const common = require('../common');
// _stream_duplex is deprecated.
common.expectWarning('DeprecationWarning',
'The _stream_duplex module is deprecated.', 'DEP0193');
'The _stream_duplex module is deprecated. Use `node:stream` instead.', 'DEP0193');
require('_stream_duplex');

View File

@ -5,6 +5,6 @@ const common = require('../common');
// _stream_passthrough is deprecated.
common.expectWarning('DeprecationWarning',
'The _stream_passthrough module is deprecated.', 'DEP0193');
'The _stream_passthrough module is deprecated. Use `node:stream` instead.', 'DEP0193');
require('_stream_passthrough');

View File

@ -5,6 +5,6 @@ const common = require('../common');
// _stream_readable is deprecated.
common.expectWarning('DeprecationWarning',
'The _stream_readable module is deprecated.', 'DEP0193');
'The _stream_readable module is deprecated. Use `node:stream` instead.', 'DEP0193');
require('_stream_readable');

View File

@ -5,6 +5,6 @@ const common = require('../common');
// _stream_transform is deprecated.
common.expectWarning('DeprecationWarning',
'The _stream_transform module is deprecated.', 'DEP0193');
'The _stream_transform module is deprecated. Use `node:stream` instead.', 'DEP0193');
require('_stream_transform');

View File

@ -5,6 +5,6 @@ const common = require('../common');
// _stream_wrap is deprecated.
common.expectWarning('DeprecationWarning',
'The _stream_wrap module is deprecated.', 'DEP0125');
'The _stream_wrap module is deprecated. Use `node:stream` instead.', 'DEP0125');
require('_stream_wrap');

View File

@ -5,6 +5,6 @@ const common = require('../common');
// _stream_writable is deprecated.
common.expectWarning('DeprecationWarning',
'The _stream_writable module is deprecated.', 'DEP0193');
'The _stream_writable module is deprecated. Use `node:stream` instead.', 'DEP0193');
require('_stream_writable');

View File

@ -6,6 +6,6 @@ if (!common.hasCrypto) common.skip('missing crypto');
// _tls_common is deprecated.
common.expectWarning('DeprecationWarning',
'The _tls_common module is deprecated.', 'DEP0192');
'The _tls_common module is deprecated. Use `node:tls` instead.', 'DEP0192');
require('_tls_common');

View File

@ -6,6 +6,6 @@ if (!common.hasCrypto) common.skip('missing crypto');
// _tls_wrap is deprecated.
common.expectWarning('DeprecationWarning',
'The _tls_wrap module is deprecated.', 'DEP0192');
'The _tls_wrap module is deprecated. Use `node:tls` instead.', 'DEP0192');
require('_tls_wrap');