Skip to content

Commit

Permalink
module: remove usage of require('util') in cjs/loader.js
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
dnlup authored and targos committed Mar 27, 2019
1 parent 83f6ec8 commit 414d6f5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/internal/modules/cjs/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

const { NativeModule } = require('internal/bootstrap/loaders');
const { pathToFileURL } = require('internal/url');
const util = require('util');
const { deprecate } = require('internal/util');
const vm = require('vm');
const assert = require('internal/assert');
const fs = require('fs');
Expand Down Expand Up @@ -182,8 +182,7 @@ function debug(...args) {
debuglog(...args);
}

Module._debug = util.deprecate(debug, 'Module._debug is deprecated.',
'DEP0077');
Module._debug = deprecate(debug, 'Module._debug is deprecated.', 'DEP0077');

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

0 comments on commit 414d6f5

Please sign in to comment.