Skip to content

Commit 9d8afa9

Browse files
fixup! lib: deprecate _tls_common and _tls_wrap
restrict exports of _tls_common and _tls_wrap modules
1 parent 50c51bd commit 9d8afa9

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

lib/_tls_common.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
'use strict';
22

3-
module.exports = require('internal/tls/common');
3+
const { SecureContext, createSecureContext, translatePeerCertificate } = require('internal/tls/common');
4+
module.exports = {
5+
SecureContext,
6+
createSecureContext,
7+
translatePeerCertificate,
8+
};
49
process.emitWarning('The _tls_common module is deprecated.',
510
'DeprecationWarning', 'DEP0191');

lib/_tls_wrap.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
'use strict';
22

3-
module.exports = require('internal/tls/wrap');
3+
const { TLSSocket, Server, createServer, connect } = require('internal/tls/wrap');
4+
module.exports = {
5+
TLSSocket,
6+
Server,
7+
createServer,
8+
connect,
9+
};
410
process.emitWarning('The _tls_wrap module is deprecated.',
511
'DeprecationWarning', 'DEP0191');

0 commit comments

Comments
 (0)