util: honor breakLength Infinity with unlimited depth#62452
Open
Lellansin wants to merge 1 commit intonodejs:mainfrom
Open
util: honor breakLength Infinity with unlimited depth#62452Lellansin wants to merge 1 commit intonodejs:mainfrom
Lellansin wants to merge 1 commit intonodejs:mainfrom
Conversation
Preserve single-line formatting for util.inspect() when breakLength is Infinity and depth is unlimited, while keeping explicit compact settings and customized defaultOptions.compact behavior unchanged. Add regression coverage for depth: Infinity, depth: null, explicit compact: 3, explicit compact: 1, and custom defaultOptions.compact. Fixes: nodejs#60475
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Restore single-line
util.inspect()output whenbreakLengthisInfinityand depth is unlimited. This covers both
depth: Infinityanddepth: null.Keep existing behavior for explicit non-default
compactsettings and forcustomized
util.inspect.defaultOptions.compact, so the fix only applies tothe default
compact: 3formatting behavior.Add regression coverage for:
depth: Infinitydepth: nullcompact: 3compact: 1util.inspect.defaultOptions.compactValidation:
make -j8 nodepython3 tools/test.py test/parallel/test-util-inspect.jsmake lintFixes: #60475