Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

module: remove usage of require('util') in esm/translators.js #26806

Closed

Conversation

dnlup
Copy link
Contributor

@dnlup dnlup commented Mar 20, 2019

Use require('internal/util/debuglog').debuglog and
require('internal/util').promisify
instead of require('util').debuglog and require('util').promisify in
lib/internal/modules/translators.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_esm_translators branch from 28508c7 to edfa70f Compare March 20, 2019 13:26
@dnlup dnlup changed the title module: remove usage of require('util') module: remove usage of require('util') in esm/translators.js Mar 20, 2019
@@ -19,7 +19,8 @@ const {
StringPrototype
} = primordials;
const { URL } = require('url');
const { debuglog, promisify } = require('util');
const debuglog = require('internal/util/debuglog').debuglog;
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 debuglog = require('internal/util/debuglog').debuglog;
const { debuglog } = require('internal/util/debuglog');

@@ -19,7 +19,8 @@ const {
StringPrototype
} = primordials;
const { URL } = require('url');
const { debuglog, promisify } = require('util');
const debuglog = require('internal/util/debuglog').debuglog;
const promisify = require('internal/util').promisify;
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 promisify = require('internal/util').promisify;
const { promisify } = require('internal/util');

Use `require('internal/util/debuglog').debuglog` and
`require('internal/util').promisify`
instead of `require('util').debuglog` and `require('util').promisify` in
`lib/internal/modules/translators.js`.

Refs: nodejs#26546
@dnlup dnlup force-pushed the util_internal_modules_esm_translators branch from edfa70f to cb61931 Compare March 21, 2019 15:39
@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
Copy link
Member

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

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

Landed in 0f2bf72 🎉

@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/debuglog').debuglog` and
`require('internal/util').promisify`
instead of `require('util').debuglog` and `require('util').promisify` in
`lib/internal/modules/translators.js`.

PR-URL: nodejs#26806
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/debuglog').debuglog` and
`require('internal/util').promisify`
instead of `require('util').debuglog` and `require('util').promisify` in
`lib/internal/modules/translators.js`.

PR-URL: #26806
Refs: #26546
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
@dnlup dnlup deleted the util_internal_modules_esm_translators branch January 10, 2020 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in 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