| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Review requested:
|
Sorry, something went wrong.
The kValidateObjectAllowArray flag matches the replaced check: arrays keep passing and the thrown error is unchanged. Signed-off-by: greenhead <shren0812@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. @@ 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
... and 38 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Sorry, something went wrong.
|
@nodejs/streams Could someone take a look at this? It swaps an open-coded object check in validateParams() for the existing validateObject helper, keeping the same error via kValidateObjectAllowArray. CI is green. |
Sorry, something went wrong.
|
@jasnell You wrote stream/iter, so you may be the right person to look at this one. It's a small refactor of the options.params check, with the array-accepting behaviour preserved. |
Sorry, something went wrong.
|
@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? |
Sorry, something went wrong.
Sorry, something went wrong.
The kValidateObjectAllowArray flag matches the replaced check: arrays keep passing and the thrown error is unchanged. Signed-off-by: greenhead <shren0812@gmail.com> PR-URL: #65015 Reviewed-By: James M Snell <jasnell@gmail.com>
The kValidateObjectAllowArray flag matches the replaced check: arrays keep passing and the thrown error is unchanged. Signed-off-by: greenhead <shren0812@gmail.com> PR-URL: #65015 Reviewed-By: James M Snell <jasnell@gmail.com>
| Back | FazBrowse Home | New Git URL |
Replace the open-coded object check in validateParams() with validateObject using the kValidateObjectAllowArray flag. The flag matches the previous typeof params !== 'object' || params === null semantics case by case: arrays keep passing, null and other primitives keep rejecting. Both paths construct ERR_INVALID_ARG_TYPE with 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.