summaryrefslogtreecommitdiff
path: root/lib/util.js
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2018-04-13 21:40:28 +0200
committerRuben Bridgewater <ruben@bridgewater.de>2018-05-11 17:46:56 +0200
commit849aaaeeb045965f3f8085c7cb65c3c830bd724c (patch)
tree0beefed2ec9fe936e2de381627f66b4dd3860896 /lib/util.js
parent85373aeb4c79dd16bf22549559cf09df17d78e5a (diff)
downloadandroid-node-v8-849aaaeeb045965f3f8085c7cb65c3c830bd724c.tar.gz
android-node-v8-849aaaeeb045965f3f8085c7cb65c3c830bd724c.tar.bz2
android-node-v8-849aaaeeb045965f3f8085c7cb65c3c830bd724c.zip
Revert "util: change util.inspect depth default"
This reverts commit b994b8eff6018433a56bb10dbc473cefa0dd9370. This caused regressions in ecosystem code. While the change originally was semver-major and could be postponed until after Node.js 10, I think reverting it is a good choice at this point. Also, I personally do not think defaulting to a shallow inspect is a bad thing at all – quite the opposite: It makes `util.inspect()` give an overview of an object, rather than providing a full display of its contents. Changing the `depth` default to infinity fundamentally changed the role that `util.inspect()` plays, and makes output much more verbose and thus at times unusable for `console.log()`-style debugging. PR-URL: https://github.com/nodejs/node/pull/20017 Fixes: https://github.com/nodejs/node/issues/19405 Refs: https://github.com/nodejs/node/pull/17907 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Diffstat (limited to 'lib/util.js')
-rw-r--r--lib/util.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/util.js b/lib/util.js
index 55a37c1b4b..45d98de194 100644
--- a/lib/util.js
+++ b/lib/util.js
@@ -80,7 +80,7 @@ const {
const inspectDefaultOptions = Object.seal({
showHidden: false,
- depth: null,
+ depth: 2,
colors: false,
customInspect: true,
showProxy: false,