Skip to content

lib: avoid unsafe array iteration in cli table - #65838

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
HoonDongKang:lib-avoid-unsafe-array-iteration
Sep 9, 2026
Merged

lib: avoid unsafe array iteration in cli table#65838
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
HoonDongKang:lib-avoid-unsafe-array-iteration

Conversation

@HoonDongKang

Copy link
Copy Markdown
Contributor

for...of relies on the user-mutable Array.prototype[Symbol.iterator], resulting in unsafe array iteration.

This replaces it with an index-based loop when rendering table rows.

Refs

Tests:

  • ./node test/parallel/test-console-table.js

Avoid unsafe array iteration because for...of relies on the
user-mutable Symbol.iterator. Use an index-based loop instead.

Signed-off-by: HoonDongKang <d159123@naver.com>
@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label Sep 6, 2026
@codecov

codecov Bot commented Sep 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.18%. Comparing base (6f41e41) to head (5644cef).
⚠️ Report is 101 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #65838      +/-   ##
==========================================
+ Coverage   90.17%   90.18%   +0.01%     
==========================================
  Files         770      771       +1     
  Lines      264483   264624     +141     
  Branches    50262    50230      -32     
==========================================
+ Hits       238491   238646     +155     
+ Misses      16981    16959      -22     
- Partials     9011     9019       +8     
Files with missing lines Coverage Δ
lib/internal/cli_table.js 98.95% <100.00%> (+0.02%) ⬆️

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

@daeyeon daeyeon added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Sep 7, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Sep 7, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@aduh95 aduh95 added author ready PRs with CI started, the required approvals, and no outstanding review comments. commit-queue PRs queued for automated landing through the Commit Queue. labels Sep 9, 2026
@nodejs-github-bot
nodejs-github-bot merged commit 01efbc6 into nodejs:main Sep 9, 2026
83 checks passed
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in 01efbc6

@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants