Skip to content

Commit 1a1fe53

Browse files
committed
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: #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>
1 parent ac7450a commit 1a1fe53

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

doc/api/util.md

+4
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,10 @@ property take precedence over `--trace-deprecation` and
183183
<!-- YAML
184184
added: v0.5.3
185185
changes:
186+
- version: REPLACEME
187+
pr-url: https://github.com/nodejs/node/pull/17907
188+
description: The `%o` specifier's `depth` option will now fall back to the
189+
default depth.
186190
- version: v8.4.0
187191
pr-url: https://github.com/nodejs/node/pull/14558
188192
description: The `%o` and `%O` specifiers are supported now.

lib/util.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,7 @@ function formatWithOptions(inspectOptions, f) {
113113
{
114114
const opts = Object.assign({}, inspectOptions, {
115115
showHidden: true,
116-
showProxy: true,
117-
depth: 4
116+
showProxy: true
118117
});
119118
tempStr = inspect(arguments[a++], opts);
120119
break;

0 commit comments

Comments
 (0)