@@ -40,42 +40,7 @@ const isWindows = process.platform === 'win32';
40
40
41
41
const DEBUG = process . env . NODE_DEBUG && / f s / . test ( process . env . NODE_DEBUG ) ;
42
42
const errnoException = util . _errnoException ;
43
-
44
- var printDeprecation ;
45
- try {
46
- printDeprecation = require ( 'internal/util' ) . printDeprecationMessage ;
47
- } catch ( e ) {
48
- if ( e . code !== 'MODULE_NOT_FOUND' ) throw e ;
49
-
50
- // TODO(ChALkeR): remove this in master after 6.x
51
- // This code was based upon internal/util and is required to give users
52
- // a grace period before actually breaking modules that re-evaluate fs
53
- // sources from context where internal modules are not allowed, e.g.
54
- // older versions of graceful-fs module.
55
-
56
- const prefix = `(${ process . release . name } :${ process . pid } ) ` ;
57
-
58
- printDeprecation = function ( msg , warned ) {
59
- if ( process . noDeprecation )
60
- return true ;
61
-
62
- if ( warned )
63
- return warned ;
64
-
65
- if ( process . throwDeprecation )
66
- throw new Error ( `${ prefix } ${ msg } ` ) ;
67
- else if ( process . traceDeprecation )
68
- console . trace ( msg ) ;
69
- else
70
- console . error ( `${ prefix } ${ msg } ` ) ;
71
-
72
- return true ;
73
- } ;
74
- printDeprecation ( 'fs: re-evaluating native module sources is not ' +
75
- 'supported. If you are using the graceful-fs module, ' +
76
- 'please update it to a more recent version.' ,
77
- false ) ;
78
- }
43
+ const printDeprecation = require ( 'internal/util' ) . printDeprecationMessage ;
79
44
80
45
function throwOptionsError ( options ) {
81
46
throw new TypeError ( 'Expected options to be either an object or a string, ' +
0 commit comments