Skip to content

Conversation

@BridgeAR
Copy link
Member

Fixes: #60964

@BridgeAR BridgeAR requested review from jasnell and targos December 12, 2025 11:25
@BridgeAR BridgeAR added util Issues and PRs related to the built-in util module. console Issues and PRs related to the console subsystem. labels Dec 12, 2025
@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label Dec 12, 2025
Copy link
Member

@addaleax addaleax left a comment

Choose a reason for hiding this comment

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

Seems fine, but should this be semver-major out of an abundance of caution?

@BridgeAR BridgeAR added the semver-major PRs that contain breaking changes and should be released in the next major version. label Dec 12, 2025
@BridgeAR
Copy link
Member Author

@addaleax I am fine with that. We do not have any guarantees about the output, while it is heavily used and this is definitely something I could imagine others might have had expectations upon.

@codecov
Copy link

codecov bot commented Dec 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.53%. Comparing base (fc32ac2) to head (ab89426).
⚠️ Report is 189 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #61029      +/-   ##
==========================================
- Coverage   88.53%   88.53%   -0.01%     
==========================================
  Files         703      703              
  Lines      208222   208544     +322     
  Branches    40142    40219      +77     
==========================================
+ Hits       184357   184639     +282     
- Misses      15852    15910      +58     
+ Partials     8013     7995      -18     
Files with missing lines Coverage Δ
lib/internal/util/inspect.js 99.67% <100.00%> (+<0.01%) ⬆️

... and 89 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.

@BridgeAR BridgeAR 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 Dec 12, 2025
@ljharb
Copy link
Member

ljharb commented Dec 12, 2025

Does anybody else share my concern that the intention of the language is that it's not possible to determine if something's a Proxy? I realize node already exposes such a predicate, but this will make it much more visible.

@aduh95
Copy link
Contributor

aduh95 commented Dec 12, 2025

Does anybody else share my concern that the intention of the language is that it's not possible to determine if something's a Proxy? I realize node already exposes such a predicate, but this will make it much more visible.

That seems fine, browsers already out Proxy objects in their devtool, we do on the REPL already, and it seems useful from the user perspective.

@jasnell
Copy link
Member

jasnell commented Dec 13, 2025

@ljharb ... I think there's a balance needed here. Yes, the language intends proxies to be opaque but the requirements of debugging when things go wrong require us to at least know that something is a proxy or not. They are opposing requirements. I think this PR is at least a net improvement

@ljharb
Copy link
Member

ljharb commented Dec 13, 2025

In the dev tools, and in console.log, and in the repl, is fine, because none of these are exposed to actual developer code. Why util.inspect instead of just console.log?

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. request-ci Add this label to start a Jenkins CI on a PR. semver-major PRs that contain breaking changes and should be released in the next major version. util Issues and PRs related to the built-in util module.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

console.log(proxy) default output is less than helpful

8 participants