-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
util: set super_
property to non-enumerable
#23107
Conversation
Using `util.inherits()` adds a `super_` property to the constructor and inspecting that constructor is going to show that property even though it's not useful for the user. Therefore the property is now set as non-enumerable and such entries are not visible by default when using `console.log()` or `util.inspect()`.
@nodejs/tsc PTAL |
Rebuild arm: https://ci.nodejs.org/job/node-test-commit-arm-fanned/3808/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please show the output before/after this PR?
Before:
After:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Rebuild arm again https://ci.nodejs.org/job/node-test-commit-arm-fanned/3811/ 🚫 |
I can not start arm-fanned again, so here's a complete rebuild: CI https://ci.nodejs.org/job/node-test-pull-request/17493/ ✔️ |
Landed in 5e6940d. |
Using `util.inherits()` adds a `super_` property to the constructor and inspecting that constructor is going to show that property even though it's not useful for the user. Therefore the property is now set as non-enumerable and such entries are not visible by default when using `console.log()` or `util.inspect()`. PR-URL: nodejs#23107 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]>
Using
util.inherits()
adds asuper_
property to the constructorand inspecting that constructor is going to show that property even
though it's not useful for the user.
Therefore the property is now set as non-enumerable and such entries
are not visible by default when using
console.log()
orutil.inspect()
.This significantly reduces the amount of data shown when inspecting streams.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes