-
-
Notifications
You must be signed in to change notification settings - Fork 34k
util: mark proxied objects as such when inspecting them #61029
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
util: mark proxied objects as such when inspecting them #61029
Conversation
addaleax
left a comment
There was a problem hiding this 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?
|
@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 Report✅ All modified and coverable lines are covered by tests. 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
🚀 New features to boost your workflow:
|
|
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 |
|
@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 |
|
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 |
Fixes: #60964