Skip to content

Commit

Permalink
util: change %o depth default
Browse files Browse the repository at this point in the history
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: #17907
Refs: #12693

PR-URL: #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>
  • Loading branch information
BridgeAR committed Oct 2, 2018
1 parent ac7450a commit 1a1fe53
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 4 additions & 0 deletions doc/api/util.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 1 addition & 2 deletions lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1a1fe53

Please sign in to comment.