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

lib: remove usage of require('util') #26779

Closed
wants to merge 1 commit into from

Conversation

dnlup
Copy link
Contributor

@dnlup dnlup commented Mar 19, 2019

Remove the usage of require('util').inspect.

Refs: #26546

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

Remove the usage of `require('util').inspect`.

Refs: nodejs#26546
@nodejs-github-bot nodejs-github-bot added the encoding Issues and PRs related to the TextEncoder and TextDecoder APIs. label Mar 19, 2019
@@ -327,7 +327,7 @@ class TextEncoder {
});
obj.encoding = this.encoding;
// Lazy to avoid circular dependency
return require('util').inspect(obj, opts);
return require('internal/util/inspect').inspect(obj, opts);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

If it was possible to change

customInspectSymbol: inspect

to

customInspectSymbol: <something else>

I could put require('internal/util/inspect').inspect together with all the top level imports.

@@ -530,7 +530,7 @@ function makeTextDecoderJS() {
obj[kHandle] = this[kHandle];
}
// Lazy to avoid circular dependency
return require('util').inspect(obj, opts);
return require('internal/util/inspect').inspect(obj, opts);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@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
Remove the usage of `require('util').inspect`.

PR-URL: nodejs#26779
Refs: nodejs#26546
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
@BridgeAR
Copy link
Member

Landed in e5383ad 🎉

@BridgeAR BridgeAR closed this Mar 24, 2019
targos pushed a commit to targos/node that referenced this pull request Mar 27, 2019
Remove the usage of `require('util').inspect`.

PR-URL: nodejs#26779
Refs: nodejs#26546
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
targos pushed a commit that referenced this pull request Mar 27, 2019
Remove the usage of `require('util').inspect`.

PR-URL: #26779
Refs: #26546
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
@dnlup dnlup deleted the util_internal_encoding branch January 10, 2020 13:47
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. encoding Issues and PRs related to the TextEncoder and TextDecoder APIs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants