-
Notifications
You must be signed in to change notification settings - Fork 30k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
util: mark cwd grey while inspecting errors
This changes the util.inspect() output for errors in case stack traces contain the current working directory in their trace. If that's the case, the cwd part is marked grey to focus on the rest of the path. Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de> PR-URL: #41082 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
- Loading branch information
Showing
5 changed files
with
190 additions
and
88 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,38 @@ | ||
{ foo: *[32m'bar'*[39m } | ||
{ foo: [32m'bar'[39m } | ||
string q | ||
{ foo: *[32m'bar'*[39m } with object format param | ||
{ foo: [32m'bar'[39m } with object format param | ||
|
||
Error: test | ||
at abc (../fixtures/node_modules/bar.js:4:4) | ||
foobar | ||
at * (*console_colors.js:*:*) | ||
*[90m at * (node:internal*:*:*)*[39m | ||
*[90m at *[39m | ||
*[90m at *[39m | ||
*[90m at *[39m | ||
*[90m at *[39m | ||
*[90m at *[39m | ||
at Object.<anonymous> [90m(*[39m*console_colors.js:*:*[90m)[39m | ||
[90m at * (node:internal*:*:*)[39m | ||
[90m at *[39m | ||
[90m at *[39m | ||
[90m at *[39m | ||
[90m at *[39m | ||
[90m at *[39m | ||
|
||
Error: Should not ever get here. | ||
at * (*node_modules*[4m*node_modules*[24m*bar.js:*:*) | ||
*[90m at *[39m | ||
*[90m at *[39m | ||
*[90m at *[39m | ||
*[90m at *[39m | ||
*[90m at *[39m | ||
*[90m at *[39m | ||
at * (*console_colors.js:*:*) | ||
*[90m at *[39m | ||
*[90m at *[39m | ||
at Object.<anonymous> [90m(*node_modules*[4m*node_modules*[24m*bar.js:*:*[90m)[39m | ||
[90m at *[39m | ||
[90m at *[39m | ||
[90m at *[39m | ||
[90m at *[39m | ||
[90m at *[39m | ||
[90m at *[39m | ||
at Object.<anonymous> [90m(*console_colors.js:*:*[90m)[39m | ||
[90m at *[39m | ||
[90m at *[39m | ||
|
||
Error | ||
at evalmachine.<anonymous>:*:* | ||
*[90m at Script.runInThisContext (node:vm:*:*)*[39m | ||
*[90m at Object.runInThisContext (node:vm:*:*)*[39m | ||
at * (*console_colors.js:*:*) | ||
*[90m at *[39m | ||
*[90m at *[39m | ||
*[90m at *[39m | ||
*[90m at *[39m | ||
*[90m at *[39m | ||
*[90m at *[39m | ||
[90m at Script.runInThisContext (node:vm:*:*)[39m | ||
[90m at Object.runInThisContext (node:vm:*:*)[39m | ||
at Object.<anonymous> [90m(*[39m*console_colors.js:*:*[90m)[39m | ||
[90m at *[39m | ||
[90m at *[39m | ||
[90m at *[39m | ||
[90m at *[39m | ||
[90m at *[39m | ||
[90m at *[39m |
This file contains 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