Revert 17907: util: change inspect depth default
-
Revert "util: change util.inspect depth default"
This reverts commit b994b8ef.
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 thedepth
default to infinity fundamentally changed the role thatutil.inspect()
plays, and makes output much more verbose and thus at times unusable forconsole.log()
-style debugging.Fixes: https://github.com/nodejs/node/issues/19405 Refs: https://github.com/nodejs/node/pull/17907
-
Revert "util: change %o depth default"
This reverts commit 8f153092.
(https://github.com/nodejs/node/pull/19994 also has a Fixes:
tag for https://github.com/nodejs/node/issues/19405, but it’s independent from this PR and is not uncontroversial)
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines