Repository navigation
Conversation
dreyfus92
reviewed
Nov 20, 2026
dreyfus92
left a comment
Member
There was a problem hiding this comment.
thanks for this one!
a few things before this can go in:
- #655 isn't labelled as accepted yet, and
klaw-sync/fs-readdir-recursivearen't on the issue, so we need @43081j to accept it and say if he's ok with the wider scope - symlinked folders behave differently.
recursive-readdirfollows them,klaw-syncandfs-readdir-recursivedon't, and node isn't consistent either (fs/promisesreaddir doesn't follow them,readdirSyncdoes on node 22+). worth a short note in the doc - the reason line needs the
**Motivation:**label and a period at the end - please keep the pr template for the description, you can put the verification and scope notes under the description section
Contributor
Author
|
my bad, missed that #655 wasn't accepted yet. i'll leave this until it is, and happy to cut it down to just |
maksimgm
force-pushed
the
feat/recursive-readdir
branch
from
November 20, 2026 06:03
04fb69c to
9cc511d
Compare
Contributor
Author
|
added the symlink note. fwiw |
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.
🔗 Linked issue
resolves #655
📚 Description
Adds native replacements for packages that list a directory's files recursively. Node.js has supported this since v18.17.0 / v20.1.0 via
fs.readdir(dir, { recursive: true }).recursive-readdirfs.promises.readdirklaw-syncfs.readdirSyncfs-readdir-recursivefs.readdirSyncmanifests/native.json: newfs.promises.readdirandfs.readdirSyncreplacements, plus the three mappings, all pointing to a shared docdocs/modules/recursive-readdir.md: migration guide for each package, coveringrecursive-readdir'signores,fs-readdir-recursive's default dotfile filtering and relative paths, andklaw-sync's{ path, stats }items and thenodir/nofileoptionsVerification: I ran every before/after example in the doc against the real packages (
recursive-readdir@2.2.3,fs-readdir-recursive@1.1.0,klaw-sync@8.0.0) on a fixture tree with nested dirs, dotfiles,node_modulesand an empty dir. Each pair returned the same set of paths (and the same stats, forklaw-sync). I also checked symlinked folders on node 20, 22 and 24, which is what the symlink note in the doc is based on.Scope notes:
fs.readdir(..., { recursie: true })#655 isn't accepted yet, so this is waiting on that.klaw-syncandfs-readdir-recursivearen't on the issue, but they're the same kind of package (~14M weekly downloads between them). Happy to drop them and keep this torecursive-readdir.recursive-fs(needsfs.rm,fs.cpandfs.readdir), the low-download packages (get-all-files,recur-readdir,recursive-files), andwalk-sync(globs, trailing/on dirs and anentries()API, so not a clean swap).readdirorder isn't guaranteed to match the packages, so the doc says to sort if you rely on ordering.