question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 7 years ago
  • Reactions:3
  • Comments:14 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
manidloucommented, Jan 4, 2017

Thanks @RyanZim. I will comment here as soon as the module is ready.

1reaction
manidloucommented, Jan 12, 2017

@jprichardson, @RyanZim, @agnivade thanks a lot. I truly appreciate it.

I would suggest creating an extra “lint” section in package.json so that developers can run the linter separately through “npm run lint”.

Great point. For sure, I will add it to package.json.

@RyanZim I will add the klaw-sync link to docs, then submit PR.

Read more comments on GitHub >

github_iconTop Results From Across the Web

walk-sync JavaScript and Node.js code examples - Tabnine
Best JavaScript code snippets using walk-sync(Showing top 6 results out of 315) ; }), b.add("walk-sync", () => { walkSync("node_modules"); ; folders .filter(item => ......
Read more >
walk-sync - npm Package Health Analysis - Snyk
Ensure you're using the healthiest npm packages. Snyk scans all the packages in your projects for vulnerabilities and provides automated fix advice.
Read more >
fs-extra - npm
Such as recursive mkdir, copy, and remove. ... What happened to walk() and walkSync() ? They were removed from fs-extra in v2.0.0.
Read more >
walk-sync - NPM Package Overview - Socket - Socket.dev
Start using Socket to analyze walk-sync and its 4 dependencies to secure your app from supply chain attacks. ... isDirectory() // => true...
Read more >
node_modules/fs-extra/CHANGELOG.md ... - GitLab
Removed · BREAKING: Removed support for Node v0.12 . The Node foundation stopped officially supporting it on Jan 1st, 2017. · BREAKING: Remove...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found