stream: use validateObject for zlib/iter params - #65015
Conversation
|
Review requested:
|
The kValidateObjectAllowArray flag matches the replaced check: arrays keep passing and the thrown error is unchanged. Signed-off-by: greenhead <shren0812@gmail.com>
23fcacd to
163140a
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #65015 +/- ##
==========================================
- Coverage 90.30% 90.28% -0.02%
==========================================
Files 759 759
Lines 247621 247633 +12
Branches 46672 46688 +16
==========================================
- Hits 223603 223585 -18
- Misses 15473 15515 +42
+ Partials 8545 8533 -12
🚀 New features to boost your workflow:
|
|
@nodejs/streams Could someone take a look at this? It swaps an open-coded object check in |
|
@jasnell You wrote |
This comment was marked as outdated.
This comment was marked as outdated.
|
@jasnell Thanks for reviewing and approving this! The failures in CI #75831 appear unrelated to this change. The Node.js reliability report records the same failures across multiple unrelated PRs:
https://github.com/nodejs/reliability/blob/main/reports/2026-08-15.md Would you mind resuming the top-level CI job when you have a chance? |
|
Landed in 1dacb39 |
Replace the open-coded object check in
validateParams()withvalidateObjectusing thekValidateObjectAllowArrayflag. The flag matches the previoustypeof params !== 'object' || params === nullsemantics case by case: arrays keep passing, null and other primitives keep rejecting. Both paths constructERR_INVALID_ARG_TYPEwith identical arguments, so the error type, code, and message are unchanged.The added test locks the array-accepting boundary, which was not covered by the existing validation tests, and passes with and without the lib change.