-
-
Notifications
You must be signed in to change notification settings - Fork 33.5k
util: do not print getters as regular property using inspect #60131
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: do not print getters as regular property using inspect #60131
Conversation
This makes sure special properties (such as a byteLength, buffer, and more) are marked that they are not regular properties. They are mostly getters, that just seemed even more of a breaking change. Thus, they just use square brackets for now. On top of that, it makes inspecting detached DataViews robust. Inspecting those failed so far. Closes: nodejs#56669
a4d876f
to
6599727
Compare
This comment was marked as resolved.
This comment was marked as resolved.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #60131 +/- ##
==========================================
+ Coverage 88.52% 88.53% +0.01%
==========================================
Files 703 703
Lines 207825 207822 -3
Branches 40003 40011 +8
==========================================
+ Hits 183976 184001 +25
+ Misses 15862 15818 -44
- Partials 7987 8003 +16
🚀 New features to boost your workflow:
|
Commit Queue failed- Loading data for nodejs/node/pull/60131 ✔ Done loading data for nodejs/node/pull/60131 ----------------------------------- PR info ------------------------------------ Title util: do not print getters as regular property using inspect (#60131) Author Ruben Bridgewater <[email protected]> (@BridgeAR) Branch BridgeAR:2025-10-06-util-inspect-improvements -> nodejs:main Labels util, author ready, needs-ci Commits 2 - util: mark special properties when inspecting them - fixup! Committers 1 - Ruben Bridgewater <[email protected]> PR-URL: https://github.com/nodejs/node/pull/60131 Fixes: https://github.com/nodejs/node/pull/56669 Reviewed-By: Jordan Harband <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/60131 Fixes: https://github.com/nodejs/node/pull/56669 Reviewed-By: Jordan Harband <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> -------------------------------------------------------------------------------- ℹ This PR was created on Mon, 06 Oct 2025 14:56:28 GMT ✔ Approvals: 2 ✔ - Jordan Harband (@ljharb): https://github.com/nodejs/node/pull/60131#pullrequestreview-3315661420 ✔ - Antoine du Hamel (@aduh95) (TSC): https://github.com/nodejs/node/pull/60131#pullrequestreview-3326129715 ✔ Last GitHub CI successful ℹ Last Full PR CI on 2025-10-17T22:12:21Z: https://ci.nodejs.org/job/node-test-pull-request/69798/ - Querying data for job/node-test-pull-request/69798/ ✔ 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 60131 From https://github.com/nodejs/node * branch refs/pull/60131/merge -> FETCH_HEAD ✔ Fetched commits as 382f7cfcefda..db6203accc1c -------------------------------------------------------------------------------- [main 60dbad30f0] util: mark special properties when inspecting them Author: Ruben Bridgewater <[email protected]> Date: Mon Oct 6 16:40:48 2025 +0200 2 files changed, 102 insertions(+), 78 deletions(-) [main 4f16bf531e] fixup! Author: Ruben Bridgewater <[email protected]> Date: Mon Oct 6 17:31:20 2025 +0200 1 file changed, 1 insertion(+), 1 deletion(-) ✔ Patches applied There are 2 commits in the PR. Attempting autorebase. Rebasing (2/4) Executing: git node land --amend --yes --------------------------------- New Message ---------------------------------- util: mark special properties when inspecting themhttps://github.com/nodejs/node/actions/runs/18619296831 |
Commit Queue failed- Loading data for nodejs/node/pull/60131 ✔ Done loading data for nodejs/node/pull/60131 ----------------------------------- PR info ------------------------------------ Title util: do not print getters as regular property using inspect (#60131) Author Ruben Bridgewater <[email protected]> (@BridgeAR) Branch BridgeAR:2025-10-06-util-inspect-improvements -> nodejs:main Labels util, author ready, needs-ci, commit-queue-squash Commits 2 - util: mark special properties when inspecting them - fixup! Committers 1 - Ruben Bridgewater <[email protected]> PR-URL: https://github.com/nodejs/node/pull/60131 Fixes: https://github.com/nodejs/node/pull/56669 Reviewed-By: Jordan Harband <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/60131 Fixes: https://github.com/nodejs/node/pull/56669 Reviewed-By: Jordan Harband <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> -------------------------------------------------------------------------------- ℹ This PR was created on Mon, 06 Oct 2025 14:56:28 GMT ✔ Approvals: 2 ✔ - Jordan Harband (@ljharb): https://github.com/nodejs/node/pull/60131#pullrequestreview-3315661420 ✔ - Antoine du Hamel (@aduh95) (TSC): https://github.com/nodejs/node/pull/60131#pullrequestreview-3326129715 ✔ Last GitHub CI successful ℹ Last Full PR CI on 2025-10-18T18:23:24Z: https://ci.nodejs.org/job/node-test-pull-request/69798/ - Querying data for job/node-test-pull-request/69798/ ✔ 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 60131 From https://github.com/nodejs/node * branch refs/pull/60131/merge -> FETCH_HEAD ✔ Fetched commits as 382f7cfcefda..db6203accc1c -------------------------------------------------------------------------------- [main e4ea238c57] util: mark special properties when inspecting them Author: Ruben Bridgewater <[email protected]> Date: Mon Oct 6 16:40:48 2025 +0200 2 files changed, 102 insertions(+), 78 deletions(-) [main 4adc13ab90] fixup! Author: Ruben Bridgewater <[email protected]> Date: Mon Oct 6 17:31:20 2025 +0200 1 file changed, 1 insertion(+), 1 deletion(-) ✔ Patches applied There are 2 commits in the PR. Attempting to fixup everything into first commit. [main 3a7c05e1a4] util: mark special properties when inspecting them Author: Ruben Bridgewater <[email protected]> Date: Mon Oct 6 16:40:48 2025 +0200 3 files changed, 103 insertions(+), 79 deletions(-) --------------------------------- New Message ---------------------------------- util: mark special properties when inspecting themhttps://github.com/nodejs/node/actions/runs/18619860582 |
Commit Queue failed- Loading data for nodejs/node/pull/60131 ✔ Done loading data for nodejs/node/pull/60131 ----------------------------------- PR info ------------------------------------ Title util: do not print getters as regular property using inspect (#60131) Author Ruben Bridgewater <[email protected]> (@BridgeAR) Branch BridgeAR:2025-10-06-util-inspect-improvements -> nodejs:main Labels util, author ready, needs-ci, commit-queue-squash Commits 2 - util: mark special properties when inspecting them - fixup! Committers 1 - Ruben Bridgewater <[email protected]> PR-URL: https://github.com/nodejs/node/pull/60131 Fixes: https://github.com/nodejs/node/pull/56669 Reviewed-By: Jordan Harband <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/60131 Fixes: https://github.com/nodejs/node/pull/56669 Reviewed-By: Jordan Harband <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> -------------------------------------------------------------------------------- ℹ This PR was created on Mon, 06 Oct 2025 14:56:28 GMT ✔ Approvals: 2 ✔ - Jordan Harband (@ljharb): https://github.com/nodejs/node/pull/60131#pullrequestreview-3315661420 ✔ - Antoine du Hamel (@aduh95) (TSC): https://github.com/nodejs/node/pull/60131#pullrequestreview-3326129715 ✔ Last GitHub CI successful ℹ Last Full PR CI on 2025-10-18T19:16:11Z: https://ci.nodejs.org/job/node-test-pull-request/69798/ - Querying data for job/node-test-pull-request/69798/ ✔ 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 60131 From https://github.com/nodejs/node * branch refs/pull/60131/merge -> FETCH_HEAD ✔ Fetched commits as 382f7cfcefda..db6203accc1c -------------------------------------------------------------------------------- [main 5b97847dc9] util: mark special properties when inspecting them Author: Ruben Bridgewater <[email protected]> Date: Mon Oct 6 16:40:48 2025 +0200 2 files changed, 102 insertions(+), 78 deletions(-) [main b4fef019de] fixup! Author: Ruben Bridgewater <[email protected]> Date: Mon Oct 6 17:31:20 2025 +0200 1 file changed, 1 insertion(+), 1 deletion(-) ✔ Patches applied There are 2 commits in the PR. Attempting to fixup everything into first commit. [main f919edcbc1] util: mark special properties when inspecting them Author: Ruben Bridgewater <[email protected]> Date: Mon Oct 6 16:40:48 2025 +0200 3 files changed, 103 insertions(+), 79 deletions(-) --------------------------------- New Message ---------------------------------- util: mark special properties when inspecting themhttps://github.com/nodejs/node/actions/runs/18619962552 |
Landed in 70e7c15 |
This makes sure special properties (such as a byteLength, buffer, and more) are marked that they are not regular properties. They are mostly getters, that just seemed even more of a breaking change. Thus, they just use square brackets for now.
On top of that, it makes inspecting detached DataViews robust. Inspecting those failed so far.
Closes: #56669