lib: fix readdir in recursive mode with a buffer argument#60936
Open
y-okt wants to merge 4 commits intonodejs:mainfrom
Open
lib: fix readdir in recursive mode with a buffer argument#60936y-okt wants to merge 4 commits intonodejs:mainfrom
y-okt wants to merge 4 commits intonodejs:mainfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #60936 +/- ##
==========================================
+ Coverage 88.53% 88.54% +0.01%
==========================================
Files 703 703
Lines 208546 208596 +50
Branches 40217 40238 +21
==========================================
+ Hits 184634 184701 +67
+ Misses 15926 15905 -21
- Partials 7986 7990 +4
🚀 New features to boost your workflow:
|
Contributor
|
correct handling of buffer arguments in recursive readdir aligns the behavior with people's expectations and makes the fs API more consistent the Codecov report shows two uncovered lines in promises.js - adding a test for the recursive + Buffer path would close that gap and make the fix fully covered |
y-okt
added a commit
to y-okt/node
that referenced
this pull request
Dec 8, 2025
add a test with withFileTypes true Fixes: nodejs#60936
738b7ed to
36b64a5
Compare
y-okt
added a commit
to y-okt/node
that referenced
this pull request
Dec 9, 2025
add a test with withFileTypes true Fixes: nodejs#60936
calling readdir with a buffer arguemnt and the recursive flag produces an ERR_INVALID_ARG_TYPE error. This is to fix that. Fixes: nodejs#58892
add a test with withFileTypes true Fixes: nodejs#60936
fix failing tests in the previous commit Fixes: nodejs#60936
36b64a5 to
923d4f4
Compare
as CI is failing, make test fix Fixes: nodejs#60936
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #58892
Calling readdir with a Buffer argument and the recursive flag produces an ERR_INVALID_ARG_TYPE error. The expected behavior would be for the readdir functions not to error and return either an array of Buffers or Dirents (depending on options.withFileTypes)