Skip to content

Conversation

@Ayoub-Mabrouk
Copy link

Replace native array methods (.push, .pop, .splice, .slice) withprimordials (ArrayPrototypePush, ArrayPrototypePop, ArrayPrototypeSplice,ArrayPrototypeSlice) throughout lib/internal/util/inspect.js for consistency and security.

This improves protection against prototype pollution and aligns with the primordials pattern used throughout the codebase.

Replace native array methods (.push, .pop, .splice, .slice) with
primordials (ArrayPrototypePush, ArrayPrototypePop, ArrayPrototypeSplice,
ArrayPrototypeSlice) throughout lib/internal/util/inspect.js for
consistency and security.

This improves protection against prototype pollution and aligns with
the primordials pattern used throughout the codebase.
@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 Dec 29, 2025
@codecov
Copy link

codecov bot commented Dec 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.52%. Comparing base (05d6b9b) to head (2a3009f).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #61196      +/-   ##
==========================================
- Coverage   88.53%   88.52%   -0.02%     
==========================================
  Files         703      703              
  Lines      208599   208599              
  Branches    40229    40228       -1     
==========================================
- Hits       184685   184658      -27     
- Misses      15939    15953      +14     
- Partials     7975     7988      +13     
Files with missing lines Coverage Δ
lib/internal/util/inspect.js 99.60% <100.00%> (-0.04%) ⬇️

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

@avivkeller avivkeller added the needs-benchmark-ci PR that need a benchmark CI run. label Dec 29, 2025
@avivkeller
Copy link
Member

Please amend your commit to abide by the comment guidelines

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-benchmark-ci PR that need a benchmark CI run. 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