-
Notifications
You must be signed in to change notification settings - Fork 30
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
feat: add glob-source from js-ipfs so it can be shared with the http client #9
Conversation
4e4fcf0
to
ab8edd2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a test for multiple paths please?
src/files/glob-source.js
Outdated
* @param {Boolean} [options.followSymlinks] follow symlinks | ||
* @yields {Object} File objects in the form `{ path: String, content: AsyncIterator<Buffer> }` | ||
*/ | ||
module.exports = async function * globSource (...args) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't the arguments be function(Array<string> paths, Object options)
? instead of multiple paths as arguments?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's just been ported as-is from js-ipfs
Done |
ready to merge ? |
I'm starting to think you're right about the function signature. Having an iterable as the first argument would let us stream stuff into this function. |
Merge and release please 🙏 |
can you fix the conflicts please? |
The business of turning a path and pattern into an iterator of files is duplicated between js-ipfs and js-ipfs-http-client so moving it here to aid deduplication.
Fix typo Co-Authored-By: Hugo Dias <hugomrdias@gmail.com>
3fe3f26
to
6d976fa
Compare
I had this exact experience while looking at pointless mfs tests that don't assert anything in Who wrote this garbage? Oh, it was me. |
The business of turning a path and pattern into an iterator of files is duplicated between
js-ipfs
andjs-ipfs-http-client
so moving it here to aid deduplication.