-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
stream: improve buffer list inspection #23109
Conversation
This makes sure the indentation level is correct, no matter if the inspected buffer list is inspected on a deeper level and custom inspect options are now passed through to the actual inspection.
@nodejs/streams PTAL |
@nodejs/util PTAL |
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
that’s ok, we are transpiling anyway.
Il giorno ven 28 set 2018 alle 13:30 Ruben Bridgewater <
[email protected]> ha scritto:
… ***@***.**** commented on this pull request.
------------------------------
In lib/internal/streams/buffer_list.js
<#23109 (comment)>:
> @@ -158,8 +158,14 @@ module.exports = class BufferList {
return ret;
}
- [inspect.custom]() {
- const obj = inspect({ length: this.length });
- return `${this.constructor.name} ${obj}`;
+ // Make sure the linked list only shows the minimal necessary information.
+ [inspect.custom](_, options) {
+ return inspect(this, {
+ ...options,
+ // Only inspect one level.
+ depth: 0,
+ // It should not recurse.
+ customInspect: false
+ });
They are defined and the functionality of the options did not change but
the object spread notation does not exist.
—
You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub
<#23109 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AADL4zvP1D8Z20v_oALY3jvhzC2sYSUkks5ufghGgaJpZM4W7nUb>
.
|
CI: https://ci.nodejs.org/job/node-test-pull-request/17546/ ✔️ (besides Windows fanned) |
Rebuild Windows fanned https://ci.nodejs.org/job/node-test-commit-windows-fanned/21166/ |
Another rebuild of Windows fanned: https://ci.nodejs.org/job/node-test-commit-windows-fanned/21193/ ✔️ |
Landed in 9c3c0f4. |
This makes sure the indentation level is correct, no matter if the inspected buffer list is inspected on a deeper level and custom inspect options are now passed through to the actual inspection. PR-URL: #23109 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]>
This makes sure the indentation level is correct, no matter if the inspected buffer list is inspected on a deeper level and custom inspect options are now passed through to the actual inspection. PR-URL: #23109 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]>
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes