Skip to content

Conversation

BridgeAR
Copy link
Member

@BridgeAR BridgeAR commented Oct 6, 2025

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

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. util Issues and PRs related to the built-in util module. labels Oct 6, 2025
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
@BridgeAR BridgeAR force-pushed the 2025-10-06-util-inspect-improvements branch from a4d876f to 6599727 Compare October 6, 2025 14:58
@ljharb

This comment was marked as resolved.

@BridgeAR BridgeAR changed the title util: mark special properties when inspecting them util: do not serialize getters as regular property using inspect Oct 6, 2025
@BridgeAR BridgeAR changed the title util: do not serialize getters as regular property using inspect util: do not print getters as regular property using inspect Oct 6, 2025
Copy link

codecov bot commented Oct 6, 2025

Codecov Report

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

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     
Files with missing lines Coverage Δ
lib/internal/util/inspect.js 99.93% <100.00%> (+0.03%) ⬆️

... and 34 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 Oct 9, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 9, 2025
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@aduh95 aduh95 added the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 18, 2025
@nodejs-github-bot nodejs-github-bot added commit-queue-failed An error occurred while landing this pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels Oct 18, 2025
@nodejs-github-bot
Copy link
Collaborator

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 them

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
PR-URL: #60131
Fixes: #56669
Reviewed-By: Jordan Harband <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>

[detached HEAD 37bc352725] 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(-)
Rebasing (3/4)
Rebasing (4/4)
Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
fixup!

PR-URL: #60131
Fixes: #56669
Reviewed-By: Jordan Harband <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>

[detached HEAD 3415267b9f] fixup!
Author: Ruben Bridgewater <[email protected]>
Date: Mon Oct 6 17:31:20 2025 +0200
1 file changed, 1 insertion(+), 1 deletion(-)
Successfully rebased and updated refs/heads/main.

ℹ Add commit-queue-squash label to land the PR as one commit, or commit-queue-rebase to land as separate commits.

https://github.com/nodejs/node/actions/runs/18619296831

@aduh95 aduh95 added commit-queue Add this label to land a pull request using GitHub Actions. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. and removed commit-queue-failed An error occurred while landing this pull request using GitHub Actions. labels Oct 18, 2025
@nodejs-github-bot nodejs-github-bot added commit-queue-failed An error occurred while landing this pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels Oct 18, 2025
@nodejs-github-bot
Copy link
Collaborator

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 them

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
PR-URL: #60131
Fixes: #56669
Reviewed-By: Jordan Harband <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>

[main 4ea8973475] 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(-)
✖ 4ea8973475e7a15969e41bb8676e1ffd28dca10f
✔ 0:0 no Co-authored-by metadata co-authored-by-is-trailer
✖ 11:7 Pull request URL must reference a comment or discussion. fixes-url
✔ 0:0 blank line after title line-after-title
✔ 0:0 line-lengths are valid line-length
✔ 0:0 metadata is at end of message metadata-end
✔ 10:8 PR-URL is valid. pr-url
✔ 0:0 reviewers are valid reviewers
✔ 0:0 valid subsystems subsystem
✔ 0:0 Title is formatted correctly. title-format
✔ 0:0 Title is <= 50 columns. title-length

ℹ Please fix the commit message and try again.
Please manually ammend the commit message, by running
git commit --amend
Once commit message is fixed, finish the landing command running
git node land --continue

https://github.com/nodejs/node/actions/runs/18619860582

@aduh95 aduh95 added commit-queue Add this label to land a pull request using GitHub Actions. and removed commit-queue-failed An error occurred while landing this pull request using GitHub Actions. labels Oct 18, 2025
@nodejs-github-bot nodejs-github-bot added commit-queue-failed An error occurred while landing this pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels Oct 18, 2025
@nodejs-github-bot
Copy link
Collaborator

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 them

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
PR-URL: #60131
Fixes: #56669
Reviewed-By: Jordan Harband <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>

[main 2bde5a3553] 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(-)
✖ 2bde5a3553ad61f08ea26ce0b5373de3896ccb60
✔ 0:0 no Co-authored-by metadata co-authored-by-is-trailer
✖ 11:7 Pull request URL must reference a comment or discussion. fixes-url
✔ 0:0 blank line after title line-after-title
✔ 0:0 line-lengths are valid line-length
✔ 0:0 metadata is at end of message metadata-end
✔ 10:8 PR-URL is valid. pr-url
✔ 0:0 reviewers are valid reviewers
✔ 0:0 valid subsystems subsystem
✔ 0:0 Title is formatted correctly. title-format
✔ 0:0 Title is <= 50 columns. title-length

ℹ Please fix the commit message and try again.
Please manually ammend the commit message, by running
git commit --amend
Once commit message is fixed, finish the landing command running
git node land --continue

https://github.com/nodejs/node/actions/runs/18619962552

@aduh95 aduh95 merged commit 70e7c15 into nodejs:main Oct 18, 2025
88 checks passed
@aduh95
Copy link
Contributor

aduh95 commented Oct 18, 2025

Landed in 70e7c15

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. commit-queue-failed An error occurred while landing this pull request using GitHub Actions. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. needs-ci PRs that need a full CI run. util Issues and PRs related to the built-in util module.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants