-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
util: limit inspect to only show own properties #61032
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
util: limit inspect to only show own properties #61032
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #61032 +/- ##
==========================================
- Coverage 88.52% 88.51% -0.01%
==========================================
Files 703 703
Lines 208538 208546 +8
Branches 40214 40219 +5
==========================================
- Hits 184615 184604 -11
- Misses 15921 15968 +47
+ Partials 8002 7974 -28
🚀 New features to boost your workflow:
|
Error's cause and errors properties would be visible even if these were not own properties. This is changed to align with all other parts of the inspect handling. Fixes: nodejs#60717 Closes: nodejs#60724
e0f773f to
29620d2
Compare
Commit Queue failed- Loading data for nodejs/node/pull/61032 ✔ Done loading data for nodejs/node/pull/61032 ----------------------------------- PR info ------------------------------------ Title util: limit inspect to only show own properties (#61032) Author Ruben Bridgewater <ruben@bridgewater.de> (@BridgeAR) Branch BridgeAR:BridgeAR/2025-12-12-only-inspect-own-properties -> nodejs:main Labels assert, util, console, author ready, needs-ci, commit-queue-squash Commits 2 - util: limit inspect to only show own properties - fixup! Committers 1 - Ruben Bridgewater <ruben.bridgewater@datadoghq.com> PR-URL: https://github.com/nodejs/node/pull/61032 Fixes: https://github.com/nodejs/node/issues/60717 Fixes: https://github.com/nodejs/node/pull/60724 Reviewed-By: Jordan Harband <ljharb@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/61032 Fixes: https://github.com/nodejs/node/issues/60717 Fixes: https://github.com/nodejs/node/pull/60724 Reviewed-By: Jordan Harband <ljharb@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> -------------------------------------------------------------------------------- ℹ This PR was created on Fri, 12 Dec 2025 13:25:23 GMT ✔ Approvals: 2 ✔ - Jordan Harband (@ljharb): https://github.com/nodejs/node/pull/61032#pullrequestreview-3586247028 ✔ - Antoine du Hamel (@aduh95) (TSC): https://github.com/nodejs/node/pull/61032#pullrequestreview-3580403058 ✔ Last GitHub CI successful ℹ Last Full PR CI on 2025-12-20T01:37:30Z: https://ci.nodejs.org/job/node-test-pull-request/70539/ - Querying data for job/node-test-pull-request/70539/ ✔ Build data downloaded ✔ Last Jenkins CI successful -------------------------------------------------------------------------------- ✔ No git cherry-pick in progress ✔ No git am in progress ✔ No git rebase in progress -------------------------------------------------------------------------------- - Bringing origin/main up to date... From https://github.com/nodejs/node * branch main -> FETCH_HEAD ✔ origin/main is now up-to-date - Downloading patch for 61032 From https://github.com/nodejs/node * branch refs/pull/61032/merge -> FETCH_HEAD ✔ Fetched commits as d7e4108bc1be..eee56d642aee -------------------------------------------------------------------------------- Auto-merging lib/internal/util/inspect.js [main 04e7a6fb99] util: limit inspect to only show own properties Author: Ruben Bridgewater <ruben.bridgewater@datadoghq.com> Date: Fri Dec 12 13:24:26 2025 +0100 3 files changed, 50 insertions(+), 2 deletions(-) [main fe73d78442] fixup! Author: Ruben Bridgewater <ruben.bridgewater@datadoghq.com> Date: Mon Dec 15 22:58:30 2025 +0100 1 file changed, 1 deletion(-) ✔ Patches applied There are 2 commits in the PR. Attempting to fixup everything into first commit. [main f01508c6bd] util: limit inspect to only show own properties Author: Ruben Bridgewater <ruben.bridgewater@datadoghq.com> Date: Fri Dec 12 13:24:26 2025 +0100 2 files changed, 49 insertions(+), 2 deletions(-) ⚠ Found Fixes: https://github.com/nodejs/node/issues/60717, skipping.. --------------------------------- New Message ---------------------------------- util: limit inspect to only show own propertieshttps://github.com/nodejs/node/actions/runs/20430516616 |
|
Landed in 26b7fd2 |
Error's cause and errors properties would be visible even if these were not own properties. This is changed to align with all other parts of the inspect handling.
As drive-by I changed an array to a set for faster lookup in assert.
Fixes: #60717
Closes: #60724