@@ -226,29 +226,6 @@ Object.defineProperty(process, 'argv0', {
226226} ) ;
227227process . argv [ 0 ] = process . execPath ;
228228
229- const { deprecate } = NativeModule . require ( 'internal/util' ) ;
230- {
231- // Install legacy getters on the `util` binding for typechecking.
232- // TODO(addaleax): Turn into a full runtime deprecation.
233- const pendingDeprecation = getOptionValue ( '--pending-deprecation' ) ;
234- const utilBinding = internalBinding ( 'util' ) ;
235- const types = NativeModule . require ( 'internal/util/types' ) ;
236- for ( const name of [
237- 'isArrayBuffer' , 'isArrayBufferView' , 'isAsyncFunction' ,
238- 'isDataView' , 'isDate' , 'isExternal' , 'isMap' , 'isMapIterator' ,
239- 'isNativeError' , 'isPromise' , 'isRegExp' , 'isSet' , 'isSetIterator' ,
240- 'isTypedArray' , 'isUint8Array' , 'isAnyArrayBuffer'
241- ] ) {
242- utilBinding [ name ] = pendingDeprecation ?
243- deprecate ( types [ name ] ,
244- 'Accessing native typechecking bindings of Node ' +
245- 'directly is deprecated. ' +
246- `Please use \`util.types.${ name } \` instead.` ,
247- 'DEP0103' ) :
248- types [ name ] ;
249- }
250- }
251-
252229// process.allowedNodeEnvironmentFlags
253230Object . defineProperty ( process , 'allowedNodeEnvironmentFlags' , {
254231 get ( ) {
@@ -269,6 +246,8 @@ Object.defineProperty(process, 'allowedNodeEnvironmentFlags', {
269246 enumerable : true ,
270247 configurable : true
271248} ) ;
249+
250+ const { deprecate } = NativeModule . require ( 'internal/util' ) ;
272251// process.assert
273252process . assert = deprecate (
274253 perThreadSetup . assert ,
0 commit comments