Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

module: remove usage of require('util') cjs/loader.js #26802

Closed
wants to merge 1 commit into from

Conversation

dnlup
Copy link
Contributor

@dnlup dnlup commented Mar 20, 2019

Use require('internal/util').deprecate instead of
require('util').deprecate in lib/internal/modules/cjs/loader.js.

Refs: #26546

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

@dnlup dnlup force-pushed the util_internal_modules_cjs_loader branch from c185339 to eb63e45 Compare March 20, 2019 13:29
@dnlup dnlup changed the title module: remove usage of require('util') module: remove usage of require('util') cjs/loader.js Mar 20, 2019
@@ -23,7 +23,7 @@

const { NativeModule } = require('internal/bootstrap/loaders');
const { pathToFileURL } = require('internal/url');
const util = require('util');
const deprecate = require('internal/util').deprecate;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const deprecate = require('internal/util').deprecate;
const { deprecate } = require('internal/util');

Use `require('internal/util').deprecate` instead of
`require('util').deprecate` in `lib/internal/modules/cjs/loader.js`.

Refs: nodejs#26546
@dnlup dnlup force-pushed the util_internal_modules_cjs_loader branch from eb63e45 to 88c969b Compare March 21, 2019 15:46
@BridgeAR
Copy link
Member

@BridgeAR BridgeAR added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Mar 22, 2019
@BridgeAR
Copy link
Member

BridgeAR pushed a commit to BridgeAR/node that referenced this pull request Mar 24, 2019
Use `require('internal/util').deprecate` instead of
`require('util').deprecate` in `lib/internal/modules/cjs/loader.js`.

PR-URL: nodejs#26802
Refs: nodejs#26546
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
@BridgeAR
Copy link
Member

Landed in 005528a 🎉

I moved the argument in the same line as the other arguments while landing, now that the line is not above 80 characters anymore.

@BridgeAR BridgeAR closed this Mar 24, 2019
targos pushed a commit to targos/node that referenced this pull request Mar 27, 2019
Use `require('internal/util').deprecate` instead of
`require('util').deprecate` in `lib/internal/modules/cjs/loader.js`.

PR-URL: nodejs#26802
Refs: nodejs#26546
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
targos pushed a commit that referenced this pull request Mar 27, 2019
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>
@dnlup dnlup deleted the util_internal_modules_cjs_loader branch January 10, 2020 13:45
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants