Remove walk() and walkSync()
See original GitHub issue@RyanZim and I have decided to remove walk()
and walkSync()
.
This was not an easy decision, but the long-term vision of this library is to provide Node.js programmers with an easy to use, batteries-included way to do file system operations. While we’ve succeeded up to this point, @RyanZim and I must be judicious about our resources.
I think there’s a strong case to be made for walk()
to be in the library, but the Streams interface may not belong - perhaps generators are a better way to accomplish this?
ES2015 and ES2017 bring generators and async/await. This ushers in a new era of writing JavaScript code. I believe that we’ll see a decline in using sync()
methods over the years. However, before too many people establish dependencies upon the synchronous code, it should be removed sooner rather than later. We will start with walkSync()
. The other sync methods will stay with us for awhile (at least one year).
walkSync()
joined fs-extra
for the 1.0.0
release (two months ago) and with 2.0.0
coming soon, it’s going to be removed along with walk()
. Users of walk()
have a drop-in replacement with klaw. But we don’t want to leave users of walkSync()
in the dust (I don’t think there are many at this point), but @mawni / @agnivade would you be interested in creating a klaw-sync
or walk-sync
library for us to point to users?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:3
- Comments:14 (5 by maintainers)
Thanks @RyanZim. I will comment here as soon as the module is ready.
@jprichardson, @RyanZim, @agnivade thanks a lot. I truly appreciate it.
Great point. For sure, I will add it to
package.json
.@RyanZim I will add the
klaw-sync
link to docs, then submit PR.