| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
this definitely needs tests to cover the changed behavior. ideally, you'd also provide the tests' output absent this change.
Sorry, something went wrong.
|
Hello, @ljharb The single-line formatting behaviour when breakLength is set to Infinity is covered in a test case that I have provided. |
Sorry, something went wrong.
|
@ljharb All formatting, linting, and core test suites are now fully passing (29/30 checks successful). The single remaining check (test-macOS) failed on an unrelated debugger timeout (test-debugger-exceptions.js 15000ms exceeded), which appears to be a macOS CI runner flake. Could you please re-run that failed macOS job when you have a moment to review? |
Sorry, something went wrong.
|
@hamidrezaghavami again, your test case already passes, so it's not a regression test. |
Sorry, something went wrong.
|
@ljharb To clarify my intent: this patch is a performance early exit fast path inside isBelowBreakLength when breakLength === Infinity, avoiding unnecessary string width calculation loops. Because observable output is identical to main, standard tests pass on both branches. Should we label/track this strictly as a performance optimization/cleanup rather than a bug fix? |
Sorry, something went wrong.
|
ahh ok, that wasn't clear to me before |
Sorry, something went wrong.
Signed-off-by: Hamid Reza Ghavami <hamidr.ghavami@gmail.com>
|
@ljharb The CI checks are fully green! I had to force-push one last time to shorten the test string to pass the 80-character max-len linter rule. Could you re-approve when you have a moment, so we can get this merged? |
Sorry, something went wrong.
|
Hey team! Just checking in on this. It looks like it has all necessary approvals, but the checks are failing on some unrelated flaky tests. Could a maintainer please help re-run the CI or let me know if any further action is needed? Thanks! |
Sorry, something went wrong.
Sorry, something went wrong.
Signed-off-by: Hamid Reza Ghavami <hamidr.ghavami@gmail.com> PR-URL: #64238 Reviewed-By: Jordan Harband <ljharb@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Signed-off-by: Hamid Reza Ghavami <hamidr.ghavami@gmail.com> PR-URL: #64238 Reviewed-By: Jordan Harband <ljharb@gmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
| Back | FazBrowse Home | New Git URL |
Description
When calling util.inspect() with a breakLength configuration explicitly set to Infinity, the internal layout formatting logic should bypass multi-line chunking and formatting constraints entirely, allowing the contents to naturally evaluate on a single line.
Currently, isBelowBreakLength goes through a character length loop calculation even when length checks are logically unnecessary due to the infinite upper bound. This change introduces an explicit early return branch within isBelowBreakLength when ctx.breakLength === Infinity, properly enabling a clean, un-wrapped single-line string formatting mode.
Checklist