diff --git a/doc/node-config-schema.json b/doc/node-config-schema.json index a78031061dca87..414943e571d839 100644 --- a/doc/node-config-schema.json +++ b/doc/node-config-schema.json @@ -242,7 +242,7 @@ }, "experimental-print-required-tla": { "type": "boolean", - "description": "Print pending top-level await. If --require-module is true, evaluate asynchronous graphs loaded by `require()` but do not run the microtasks, in order to to find and print top-level await in the graph" + "description": "Print pending top-level await. If --require-module is true, evaluate asynchronous graphs loaded by `require()` but do not run the microtasks, in order to find and print top-level await in the graph" }, "experimental-repl-await": { "type": "boolean", diff --git a/lib/internal/util/inspect.js b/lib/internal/util/inspect.js index c959c056fece45..e3b41d763635e9 100644 --- a/lib/internal/util/inspect.js +++ b/lib/internal/util/inspect.js @@ -2624,6 +2624,8 @@ function isBelowBreakLength(ctx, output, start, base) { // TODO(BridgeAR): Add unicode support. Use the readline getStringWidth // function. Check the performance overhead and make it an opt-in in case it's // significant. + // allow the single-line format if the length limit is infinite + if ( ctx.breakLength === Infinity) return true; let totalLength = output.length + start; if (totalLength + output.length > ctx.breakLength) return false; diff --git a/src/node_options.cc b/src/node_options.cc index 16fb1ba34e5050..ca12586e479b99 100644 --- a/src/node_options.cc +++ b/src/node_options.cc @@ -524,7 +524,7 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() { AddOption("--experimental-print-required-tla", "Print pending top-level await. If --require-module " "is true, evaluate asynchronous graphs loaded by `require()` but " - "do not run the microtasks, in order to to find and print " + "do not run the microtasks, in order to find and print " "top-level await in the graph", &EnvironmentOptions::print_required_tla, kAllowedInEnvvar);