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 size
property to output
#672
Conversation
⏱ Benchmark resultsComparing with f756b03 largeDepsEsbuild: 13.8s⬆️ 9.07% increase vs. f756b03
Legend
largeDepsZisi: 1m 16.5s⬆️ 12.09% increase vs. f756b03
Legend
|
src/zip.js
Outdated
} | ||
|
||
const { size } = await lstat(path) |
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.
Don't we want to use fs.stat()
instead of fs.lstat()
here?
I'm not sure it can actually ever be a symlink there, but if it was, would we want the size of the symlinked path, or the symlinked content?
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 won't ever be a symlink in this case because we're opening the ZIP file we're creating ourselves, but I agree that there's no reason to use lstat
. I replaced it with stat
in 6a75c74.
6a75c74
to
bacf899
Compare
- Summary
Adds a
size
property to the output ofzipFunction
andzipFunctions
, containing the number of bytes of the generated archive.Closes #620.
- Test plan
Added new test.
- A picture of a cute animal (not mandatory but encouraged)