diff options
| author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-03-30 17:33:28 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-30 15:33:28 +0000 |
| commit | 381f5801f924f204e9b7a693d8f6e78e63a654b8 (patch) | |
| tree | f96f7900da77636c6ae79dc60aedd53b0d18ed5e /ext/console | |
| parent | e0429e2ad641e9207e00838de209ce33b3562f70 (diff) | |
Revert "refactor(ext/node): Use Deno.inspect (#17960)" (#18491)
This reverts commit a3529d02329e0d2127ad2a5bb78b4c476ddd6984.
This change made debugging Node tests very hard - `AssertionError` is
now printed as `[Circular *1]` giving no visibility what failed.
We need to align two implementations together and remove this one then.
Diffstat (limited to 'ext/console')
| -rw-r--r-- | ext/console/02_console.js | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/ext/console/02_console.js b/ext/console/02_console.js index e93272de1..5547dd230 100644 --- a/ext/console/02_console.js +++ b/ext/console/02_console.js @@ -204,7 +204,7 @@ function isFullWidthCodePoint(code) { ); } -export function getStringWidth(str) { +function getStringWidth(str) { str = StringPrototypeNormalize(colors.stripColor(str), "NFC"); let width = 0; @@ -1339,16 +1339,6 @@ function inspectObject(value, inspectOptions, proxyDetails) { ) { return String(value[customInspect](inspect, inspectOptions)); } - if ( - ReflectHas(value, nodeCustomInspect) && - typeof value[nodeCustomInspect] === "function" - ) { - // TODO(kt3k): The last inspect needs to be util.inspect of Node.js. - // We need to move the implementation of util.inspect to this file. - return String( - value[nodeCustomInspect](inspectOptions.depth, inspectOptions, inspect), - ); - } // This non-unique symbol is used to support op_crates, ie. // in extensions/web we don't want to depend on public // Symbol.for("Deno.customInspect") symbol defined in the public API. @@ -2325,7 +2315,6 @@ class Console { } const customInspect = SymbolFor("Deno.customInspect"); -const nodeCustomInspect = SymbolFor("nodejs.util.inspect.custom"); function inspect( value, |
