Skip to content

Commit 49ef3ae

Browse files
committed
Revert "fs: add a temporary fix for re-evaluation support"
As planned, This reverts commit 1d79787. Fixes: #5213 PR-URL: #6413 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Сковорода Никита Андреевич <[email protected]> Reviewed-By: JungMinu - Minwoo Jung <[email protected]> Reviewed-By: Rod Vagg <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: Myles Borins <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent 1657f12 commit 49ef3ae

File tree

1 file changed

+1
-36
lines changed

1 file changed

+1
-36
lines changed

lib/fs.js

+1-36
Original file line numberDiff line numberDiff line change
@@ -40,42 +40,7 @@ const isWindows = process.platform === 'win32';
4040

4141
const DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG);
4242
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;
7944

8045
function throwOptionsError(options) {
8146
throw new TypeError('Expected options to be either an object or a string, ' +

0 commit comments

Comments
 (0)