-
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: support unixfs metadata and formatting it #14
Conversation
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.
✨ Really excited for this. Please can we have tests?
src/files/glob-source.js
Outdated
realpath: false, | ||
absolute: true | ||
}) | ||
|
||
for await (const p of glob(path, '**/*', globOptions)) { | ||
if (preserveMode || preserveMtime) { | ||
const stat = await fs.stat(p) |
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.
In the future we might get some perf wins by parallel mapping 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.
Possibly - our bottlenecks typically aren't from reading paths from the filesystem but it's worth measuring before jumping to conclusions. Like I just did.
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.
LGTM
@hugomrdias if you're happy with this PR could you merge & release it please? |
can you fix the conflicts 🙏 |
@hugomrdias done. |
@hugomrdias this went out in the same release as #15 so now UnixFSv1.5 metadata is dependent on the removal of node streams & pull-streams from IPFS, which it shouldn't be. Can this PR either be backported to |
Adds mode and mtime properties to normalised .add inputs, also adds functions for turning metadata into strings for CLI use. BREAKING CHANGE: In order to support metadata on intermediate directories, globSource in this module will now emit directories and files where previously it only emitted files.
Adds mode and mtime properties to normalised .add inputs, also adds functions for turning metadata into strings for CLI use. BREAKING CHANGE: In order to support metadata on intermediate directories, globSource in this module will now emit directories and files where previously it only emitted files.
Adds mode and mtime properties to normalised .add inputs, also adds functions for turning metadata into strings for CLI use. BREAKING CHANGE: In order to support metadata on intermediate directories, globSource in this module will now emit directories and files where previously it only emitted files.
Adds mode and mtime properties to normalised .add inputs, also adds functions for turning metadata into strings for CLI use. BREAKING CHANGE: In order to support metadata on intermediate directories, globSource in this module will now emit directories and files where previously it only emitted files.
Adds
mode
andmtime
properties to normalised.add
inputs, also adds functions for turning metadata into strings for CLI use.BREAKING CHANGE:
In order to support metadata on intermediate directories,
globSource
in this module will now emit directories and files where previously it only emitted files.