Skip to content

console: allow per-stream inspectOptions option#60082

Closed
addaleax wants to merge 1 commit into
nodejs:mainfrom
addaleax:console-inspect-options-map
Closed

console: allow per-stream inspectOptions option#60082
addaleax wants to merge 1 commit into
nodejs:mainfrom
addaleax:console-inspect-options-map

Conversation

@addaleax

@addaleax addaleax commented Oct 1, 2025

Copy link
Copy Markdown
Member

We (correctly) allow different streams to be specified for stdout and stderr, so we should also allow different inspect options for these streams.

@addaleax addaleax added semver-minor PRs that contain new features and should be released in the next minor version. console Issues and PRs related to the console subsystem. labels Oct 1, 2025
@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label Oct 1, 2025
We (correctly) allow different streams to be specified for `stdout`
and `stderr`, so we should also allow different inspect options for
these streams.
@addaleax
addaleax force-pushed the console-inspect-options-map branch from 24ddc86 to dc89673 Compare October 1, 2025 12:31
@codecov

codecov Bot commented Oct 1, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.43%. Comparing base (b217051) to head (dc89673).
⚠️ Report is 15 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #60082      +/-   ##
==========================================
- Coverage   88.45%   88.43%   -0.03%     
==========================================
  Files         703      703              
  Lines      207797   207808      +11     
  Branches    40021    40022       +1     
==========================================
- Hits       183807   183767      -40     
- Misses      15969    16019      +50     
- Partials     8021     8022       +1     
Files with missing lines Coverage Δ
lib/internal/console/constructor.js 98.14% <100.00%> (+0.02%) ⬆️

... and 30 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread lib/internal/console/constructor.js
@addaleax addaleax added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Oct 2, 2025
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 2, 2025
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

addaleax added a commit that referenced this pull request Oct 3, 2025
We (correctly) allow different streams to be specified for `stdout`
and `stderr`, so we should also allow different inspect options for
these streams.

PR-URL: #60082
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jordan Harband <ljharb@gmail.com>
@addaleax

addaleax commented Oct 3, 2025

Copy link
Copy Markdown
Member Author

Landed in 79f1999

@addaleax addaleax closed this Oct 3, 2025
targos pushed a commit that referenced this pull request Oct 6, 2025
We (correctly) allow different streams to be specified for `stdout`
and `stderr`, so we should also allow different inspect options for
these streams.

PR-URL: #60082
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jordan Harband <ljharb@gmail.com>
nodejs-github-bot added a commit that referenced this pull request Oct 7, 2025
Notable changes:

console:
  * (SEMVER-MINOR) allow per-stream `inspectOptions` option (Anna Henningsen) #60082
lib:
  * (SEMVER-MINOR) remove util.getCallSite (Rafael Gonzaga) #59980
sqlite:
  * (SEMVER-MINOR) create authorization api (Guilherme Araújo) #59928

PR-URL: #60136
RafaelGSS pushed a commit that referenced this pull request Oct 8, 2025
Notable changes:

console:
  * (SEMVER-MINOR) allow per-stream `inspectOptions` option (Anna Henningsen) #60082
lib:
  * (SEMVER-MINOR) remove util.getCallSite (Rafael Gonzaga) #59980
sqlite:
  * (SEMVER-MINOR) create authorization api (Guilherme Araújo) #59928

PR-URL: #60136
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com>
RafaelGSS pushed a commit that referenced this pull request Oct 8, 2025
Notable changes:

console:
  * (SEMVER-MINOR) allow per-stream `inspectOptions` option (Anna Henningsen) #60082
lib:
  * (SEMVER-MINOR) remove util.getCallSite (Rafael Gonzaga) #59980
sqlite:
  * (SEMVER-MINOR) create authorization api (Guilherme Araújo) #59928

PR-URL: #60136
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com>
Comment thread doc/api/console.md
Comment on lines -134 to -135
* `inspectOptions` {Object} Specifies options that are passed along to
[`util.inspect()`][].

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-1

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0000

Comment on lines -142 to -145
if (inspectOptions.colors !== undefined &&
options.colorMode !== undefined) {
throw new ERR_INCOMPATIBLE_OPTION_PAIR(
'options.inspectOptions.color', 'colorMode');

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-1

@admodius1991 admodius1991 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leave a Review

@admodius1991 admodius1991 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0000

juanarbol pushed a commit to juanarbol/node that referenced this pull request Jul 16, 2026
We (correctly) allow different streams to be specified for `stdout`
and `stderr`, so we should also allow different inspect options for
these streams.

PR-URL: nodejs#60082
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jordan Harband <ljharb@gmail.com>
juanarbol pushed a commit to juanarbol/node that referenced this pull request Jul 16, 2026
We (correctly) allow different streams to be specified for `stdout`
and `stderr`, so we should also allow different inspect options for
these streams.

PR-URL: nodejs#60082
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jordan Harband <ljharb@gmail.com>
juanarbol pushed a commit to juanarbol/node that referenced this pull request Jul 16, 2026
We (correctly) allow different streams to be specified for `stdout`
and `stderr`, so we should also allow different inspect options for
these streams.

PR-URL: nodejs#60082
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jordan Harband <ljharb@gmail.com>
juanarbol added a commit that referenced this pull request Jul 16, 2026
Notable changes:

async_hooks:
  * (SEMVER-MINOR) add trackPromises option to createHook() (Joyee Cheung) #61415
buffer:
  * (SEMVER-MINOR) increase Buffer.poolSize default to 64 KiB (Matteo Collina) #63597
cli:
  * (SEMVER-MINOR) add --max-heap-size option (tannal) #58708
console:
  * (SEMVER-MINOR) allow per-stream `inspectOptions` option (Anna Henningsen) #60082
crypto:
  * update root certificates to NSS 3.123.1 (Node.js GitHub Bot) #63527
debugger:
  * (SEMVER-MINOR) add edit-free runtime expression probes to `node inspect` (Joyee Cheung) #62713
fs:
  * (SEMVER-MINOR) add signal option to fs.stat() (Mert Can Altin) #57775
  * (SEMVER-MINOR) expose frsize field in statfs (Jinho Jang) #62277
  * (SEMVER-MINOR) add `throwIfNoEntry` option for fs.stat and fs.promises.stat (Juan José) #61178
  * (SEMVER-MINOR) add ignore option to fs.watch (Matteo Collina) #61433
http:
  * (SEMVER-MINOR) add writeInformation to send arbitrary 1xx status codes (Tim Perry) #63155
  * (SEMVER-MINOR) add req.signal to IncomingMessage (Akshat) #62541
lib:
  * (SEMVER-MINOR) remove util.getCallSite (Rafael Gonzaga) #59980
net:
  * (SEMVER-MINOR) add `setTOS` and `getTOS` to `Socket` (Amol Yadav) #61503
node-api:
  * (SEMVER-MINOR) support SharedArrayBuffer in napi_create_dataview (Kevin Eady) #60473
  * (SEMVER-MINOR) add napi_create_object_with_properties (Miguel Marcondes Filho) #59953
perf_hooks:
  * (SEMVER-MINOR) move non-standard performance properties to perf_hooks (Chengzhong Wu) #60370
sqlite:
  * (SEMVER-MINOR) add sqlite prepare options args (Guilherme Araújo) #61311
  * (SEMVER-MINOR) create authorization api (Guilherme Araújo) #59928
src:
  * (CVE-2026-21712) handle url crash on different url formats (RafaelGSS) nodejs-private/node-private#816
src,permission:
  * (SEMVER-MINOR) add --allow-inspector ability (Rafael Gonzaga) #59711
stream:
  * (SEMVER-MINOR) add bytes() method to stream/consumers (wantaek) #60426
  * (SEMVER-MINOR) do not pass `readable.compose()` output via `Readable.from()` (René) #60907
test_runner:
  * (SEMVER-MINOR) align mock timeout api (sangwook) #62820

PR-URL: TODO
@juanarbol juanarbol mentioned this pull request Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. console Issues and PRs related to the console subsystem. needs-ci PRs that need a full CI run. semver-minor PRs that contain new features and should be released in the next minor version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants