-
Notifications
You must be signed in to change notification settings - Fork 773
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove walk() and walkSync() #338
Comments
That sounds reasonable. I am interested in creating a |
I can understand about removing the sync functions, but why is walk being removed ? If the long-term vision is to allow users
why move To me, it doesn't make sense to import a library just to use a walk operation. I would just copy-paste a SO answer and be done with it. Anyways, that was my 2 cents. I am currently involved in other projects too, which will take my time. So I won't be able to actively spend my time in creating/maintaining a library. @mawni - please go ahead and create it. I would be happy to review it if you would like. |
@agnivade We hope that in the future, fs-extra will have a Also, as @jprichardson said, we must be judicious about our resources. Currently, @jprichardson & I have very little time to work on klaw. I would like to focus on cleaning up Anyhow, thanks for the quick response @agnivade. @mawni Go ahead and extract |
Actual removal done on the v2 branch ( |
Thanks @RyanZim. I will comment here as soon as the module is ready. |
@jprichardson, @RyanZim, @agnivade would you please look at https://github.com/mawni/node-klaw-sync? I'd like to know your ideas about it before publishing it. |
Sure, give me some time though. |
@mawni LGTM, though I haven't actually tried it. (I never used walk or walkSync personally) PR welcome here and at |
LGTM overall. Couple of minor points -
|
@mawni - looks good to me!
It's already there :p |
Ah I see. In that case, I would suggest creating an extra "lint" section in |
@jprichardson, @RyanZim, @agnivade thanks a lot. I truly appreciate it.
Great point. For sure, I will add it to @RyanZim I will add the |
SGTM |
@RyanZim and I have decided to remove
walk()
andwalkSync()
.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 withwalkSync()
. The other sync methods will stay with us for awhile (at least one year).walkSync()
joinedfs-extra
for the1.0.0
release (two months ago) and with2.0.0
coming soon, it's going to be removed along withwalk()
. Users ofwalk()
have a drop-in replacement with klaw. But we don't want to leave users ofwalkSync()
in the dust (I don't think there are many at this point), but @mawni / @agnivade would you be interested in creating aklaw-sync
orwalk-sync
library for us to point to users?The text was updated successfully, but these errors were encountered: