stream: improve buffer list inspection#23109
Closed
BridgeAR wants to merge 1 commit intonodejs:masterfrom
Closed
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.
Member
Author
|
@nodejs/streams PTAL |
Member
Author
|
@nodejs/util PTAL |
Member
|
that’s ok, we are transpiling anyway.
Il giorno ven 28 set 2018 alle 13:30 Ruben Bridgewater <
notifications@github.com> 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>
.
|
jasnell
approved these changes
Sep 28, 2018
Contributor
|
CI: https://ci.nodejs.org/job/node-test-pull-request/17546/ ✔️ (besides Windows fanned) |
Member
Author
|
Rebuild Windows fanned https://ci.nodejs.org/job/node-test-commit-windows-fanned/21166/ |
Contributor
|
Another rebuild of Windows fanned: https://ci.nodejs.org/job/node-test-commit-windows-fanned/21193/ ✔️ |
Contributor
|
Landed in 9c3c0f4. |
danbev
pushed a commit
that referenced
this pull request
Oct 2, 2018
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 <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Closed
targos
pushed a commit
that referenced
this pull request
Oct 3, 2018
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 <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This was referenced Oct 10, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes