File tree 1 file changed +11
-0
lines changed
1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,10 @@ const internalBindingAllowlist = new SafeSet([
105
105
'zlib' ,
106
106
] ) ;
107
107
108
+ const runtimeDeprecatedList = new SafeSet ( [
109
+ 'async_wrap' ,
110
+ ] ) ;
111
+
108
112
// Set up process.binding() and process._linkedBinding().
109
113
{
110
114
const bindingObj = ObjectCreate ( null ) ;
@@ -114,6 +118,13 @@ const internalBindingAllowlist = new SafeSet([
114
118
// Deprecated specific process.binding() modules, but not all, allow
115
119
// selective fallback to internalBinding for the deprecated ones.
116
120
if ( internalBindingAllowlist . has ( module ) ) {
121
+ if ( runtimeDeprecatedList . has ( module ) ) {
122
+ runtimeDeprecatedList . delete ( module ) ;
123
+ process . emitWarning (
124
+ `Access to process.binding('${ module } ') is deprecated.` ,
125
+ 'DeprecationWarning' ,
126
+ 'DEP0111' ) ;
127
+ }
117
128
return internalBinding ( module ) ;
118
129
}
119
130
// eslint-disable-next-line no-restricted-syntax
You can’t perform that action at this time.
0 commit comments