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`.

Refs: #26546
  • Loading branch information
dnlup committed Mar 21, 2019
1 parent 4306300 commit 88c969b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 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,8 @@ 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 88c969b

Please sign in to comment.