-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Conversation
const toBuffer = async function * (source) { | ||
for await (const chunk of source) { | ||
yield chunk.slice() | ||
} | ||
} |
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.
this pattern is begging for a it-transform
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.
Could use this: https://www.npmjs.com/package/it-buffer, it's already used in libp2p.
Pack file `mtime` and `mode` if set Depends on: * [ ] #2758 * [ ] ipfs-inactive/js-ipfs-http-client#1235
c0a4ded
to
a651279
Compare
I guess the CLI should set the |
@@ -95,7 +95,9 @@ exports.get = { | |||
async function * (source) { | |||
for await (const file of source) { | |||
const header = { | |||
name: file.path | |||
name: file.path, | |||
mtime: file.mtime ? new Date(file.mtime.secs * 1000) : null, |
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.
Similar to my comment on ipfs-inactive/js-ipfs-http-client#1235 - can this support the nsecs
mtime component too?
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.
I think this might be more complicated than I'd previously thought - it-tar
emits regular tar files, right? As I understand it, regular tar files only support seconds for mtimes, higher resolution requires GNU Tar files so it-tar
may need to be updated to support producing these.
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.
Fixed by #3785 |
Pack file
mtime
andmode
if setDepends on: