Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
lib: add module to use in module deprecation warnings
  • Loading branch information
dario-piotrowicz committed May 23, 2025
commit 9ce691fc993aa63e86868de09f12c3186ac88711
2 changes: 1 addition & 1 deletion lib/_stream_duplex.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
2 changes: 1 addition & 1 deletion lib/_stream_passthrough.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
2 changes: 1 addition & 1 deletion lib/_stream_readable.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
2 changes: 1 addition & 1 deletion lib/_stream_transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
2 changes: 1 addition & 1 deletion lib/_stream_wrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
2 changes: 1 addition & 1 deletion lib/_stream_writable.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
2 changes: 1 addition & 1 deletion lib/_tls_common.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
2 changes: 1 addition & 1 deletion lib/_tls_wrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
2 changes: 1 addition & 1 deletion test/parallel/test-warn-stream-duplex-deprecation.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
2 changes: 1 addition & 1 deletion test/parallel/test-warn-stream-passthrough-deprecation.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
2 changes: 1 addition & 1 deletion test/parallel/test-warn-stream-readable-deprecation.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
2 changes: 1 addition & 1 deletion test/parallel/test-warn-stream-transform-deprecation.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
2 changes: 1 addition & 1 deletion test/parallel/test-warn-stream-wrap-deprecation.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
2 changes: 1 addition & 1 deletion test/parallel/test-warn-stream-writable-deprecation.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
2 changes: 1 addition & 1 deletion test/parallel/test-warn-tls-common-deprecation.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
2 changes: 1 addition & 1 deletion test/parallel/test-warn-tls-wrap-deprecation.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');