Skip to content

Commit 414d6f5

Browse files
dnluptargos
authored andcommittedMar 27, 2019
module: remove usage of require('util') in cjs/loader.js
Use `require('internal/util').deprecate` instead of `require('util').deprecate` in `lib/internal/modules/cjs/loader.js`. PR-URL: #26802 Refs: #26546 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent 83f6ec8 commit 414d6f5

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed
 

‎lib/internal/modules/cjs/loader.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
const { NativeModule } = require('internal/bootstrap/loaders');
2525
const { pathToFileURL } = require('internal/url');
26-
const util = require('util');
26+
const { deprecate } = require('internal/util');
2727
const vm = require('vm');
2828
const assert = require('internal/assert');
2929
const fs = require('fs');
@@ -182,8 +182,7 @@ function debug(...args) {
182182
debuglog(...args);
183183
}
184184

185-
Module._debug = util.deprecate(debug, 'Module._debug is deprecated.',
186-
'DEP0077');
185+
Module._debug = deprecate(debug, 'Module._debug is deprecated.', 'DEP0077');
187186

188187
// Given a module name, and a list of paths to test, returns the first
189188
// matching file in the following precedence.

0 commit comments

Comments
 (0)