-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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.inspect with showHidden does not display exotic object name #36151
Comments
It should probably be: |
|
@BridgeAR it's a module namespace exotic object, so it's a language symbol. The symbol logging seems like it makes sense when using |
Ok, I found the issue. The array notation is hard coded, thus it's not working as expected. The output should be index 4e1ed55c81..b02c4bd3e3 100644
--- a/lib/internal/util/inspect.js
+++ b/lib/internal/util/inspect.js
@@ -977,7 +977,7 @@ function formatRaw(ctx, value, recurseTimes, typedArray) {
braces[0] = `${getPrefix(constructor, tag, 'WeakMap')}{`;
formatter = ctx.showHidden ? formatWeakMap : formatWeakCollection;
} else if (isModuleNamespaceObject(value)) {
- braces[0] = `[${tag}] {`;
+ braces[0] = `${getPrefix(constructor, tag, 'Module')}{`;
// Special handle keys for namespace objects.
formatter = formatNamespaceObject.bind(null, keys);
} else if (isBoxedPrimitive(value)) { |
Signed-off-by: Ruben Bridgewater <[email protected]> Fixes: nodejs#36151
Signed-off-by: Ruben Bridgewater <[email protected]> Fixes: #35730 PR-URL: #36178 Fixes: #36151 Refs: #35754 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: James M Snell <[email protected]>
Signed-off-by: Ruben Bridgewater <[email protected]> Fixes: #36151 PR-URL: #36178 Fixes: #35730 Refs: #35754 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: James M Snell <[email protected]>
Signed-off-by: Ruben Bridgewater <[email protected]> Fixes: #35730 PR-URL: #36178 Fixes: #36151 Refs: #35754 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: James M Snell <[email protected]>
Signed-off-by: Ruben Bridgewater <[email protected]> Fixes: nodejs#36151 PR-URL: nodejs#36178 Fixes: nodejs#35730 Refs: nodejs#35754 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: James M Snell <[email protected]>
Signed-off-by: Ruben Bridgewater <[email protected]> Fixes: nodejs#35730 PR-URL: nodejs#36178 Fixes: nodejs#36151 Refs: nodejs#35754 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: James M Snell <[email protected]>
Backport-PR-URL: nodejs#37100 Signed-off-by: Ruben Bridgewater <[email protected]> Fixes: nodejs#36151 PR-URL: nodejs#36178 Fixes: nodejs#35730 Refs: nodejs#35754 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: James M Snell <[email protected]>
Backport-PR-URL: nodejs#37100 Signed-off-by: Ruben Bridgewater <[email protected]> Fixes: nodejs#35730 PR-URL: nodejs#36178 Fixes: nodejs#36151 Refs: nodejs#35754 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: James M Snell <[email protected]>
Backport-PR-URL: nodejs#37100 Signed-off-by: Ruben Bridgewater <[email protected]> Fixes: nodejs#36151 PR-URL: nodejs#36178 Fixes: nodejs#35730 Refs: nodejs#35754 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: James M Snell <[email protected]>
Backport-PR-URL: nodejs#37100 Signed-off-by: Ruben Bridgewater <[email protected]> Fixes: nodejs#35730 PR-URL: nodejs#36178 Fixes: nodejs#36151 Refs: nodejs#35754 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: James M Snell <[email protected]>
Backport-PR-URL: nodejs#37100 Signed-off-by: Ruben Bridgewater <[email protected]> Fixes: nodejs#36151 PR-URL: nodejs#36178 Fixes: nodejs#35730 Refs: nodejs#35754 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: James M Snell <[email protected]>
Backport-PR-URL: nodejs#37100 Signed-off-by: Ruben Bridgewater <[email protected]> Fixes: nodejs#35730 PR-URL: nodejs#36178 Fixes: nodejs#36151 Refs: nodejs#35754 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: James M Snell <[email protected]>
Backport-PR-URL: nodejs#37100 Signed-off-by: Ruben Bridgewater <[email protected]> Fixes: nodejs#36151 PR-URL: nodejs#36178 Fixes: nodejs#35730 Refs: nodejs#35754 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: James M Snell <[email protected]>
Backport-PR-URL: nodejs#37100 Signed-off-by: Ruben Bridgewater <[email protected]> Fixes: nodejs#35730 PR-URL: nodejs#36178 Fixes: nodejs#36151 Refs: nodejs#35754 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: James M Snell <[email protected]>
Signed-off-by: Ruben Bridgewater <[email protected]> Backport-PR-URL: #37100 PR-URL: #36178 Fixes: #35730 Fixes: #36151 Refs: #35754 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: James M Snell <[email protected]>
Signed-off-by: Ruben Bridgewater <[email protected]> Backport-PR-URL: #37100 PR-URL: #36178 Fixes: #35730 Fixes: #36151 Refs: #35754 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: James M Snell <[email protected]>
Signed-off-by: Ruben Bridgewater <[email protected]> Backport-PR-URL: #37100 PR-URL: #36178 Fixes: #35730 Fixes: #36151 Refs: #35754 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: James M Snell <[email protected]>
What steps will reproduce the bug?
test.mjs
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior?
What do you see instead?
Where the leading
[]
seems like a display bug.The text was updated successfully, but these errors were encountered: