Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fixup! fixup! lib: fix fs.readdir recursive async
  • Loading branch information
RafaelGSS committed Dec 2, 2024
commit 16a29cb64fc06553962226d3c055150c25d24a11
2 changes: 1 addition & 1 deletion lib/fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -1433,7 +1433,7 @@ function readdirRecursive(basePath, options, callback) {
// The first array is the names, and the second array is the types.
// They are guaranteed to be the same length; hence, setting `length` to the length
// of the first array within the result.
const processReaddirResult = (context) => (context.withFileTypes ? handleDirents(context) : handleFilePaths(context));
const processReaddirResult = (args) => (args.context.withFileTypes ? handleDirents(args) : handleFilePaths(args));

function handleDirents({ result, currentPath, context }) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind adding jsdoc to all newly/updated functions?

@RafaelGSS RafaelGSS Nov 28, 2024

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't added jsdoc to these ones because they are not public, they are used inside readdirRecursive (which has JSDoc). It seems a pattern on this file.

const { 0: names, 1: types } = result;
Expand Down