util: change %o depth default

Since the default for depth is changed to `20` it is logical
to change the %o default as well. It will now always use the
default depth.

PR-URL: https://github.com/nodejs/node/pull/17907
Refs: https://github.com/nodejs/node/issues/12693

PR-URL: https://github.com/nodejs/node/pull/22846
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
This commit is contained in:
Ruben Bridgewater 2018-09-13 19:56:07 +02:00
parent ac7450a09a
commit 1a1fe53e3d
No known key found for this signature in database
GPG Key ID: F07496B3EB3C1762
2 changed files with 5 additions and 2 deletions

View File

@ -183,6 +183,10 @@ property take precedence over `--trace-deprecation` and
<!-- YAML
added: v0.5.3
changes:
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/17907
description: The `%o` specifier's `depth` option will now fall back to the
default depth.
- version: v8.4.0
pr-url: https://github.com/nodejs/node/pull/14558
description: The `%o` and `%O` specifiers are supported now.

View File

@ -113,8 +113,7 @@ function formatWithOptions(inspectOptions, f) {
{
const opts = Object.assign({}, inspectOptions, {
showHidden: true,
showProxy: true,
depth: 4
showProxy: true
});
tempStr = inspect(arguments[a++], opts);
break;