npm/pacote

[FEATURE] reduce file extractions on disk

Opened this issue · 0 comments

nlf commented

What / Why

https://github.com/npm/pacote/blob/main/lib/file.js#L27-L29

In these lines of code, we extract the full tarball into a temp directory, in order to read only the package.json from it. This seems pretty wasteful when we could extract just the package.json from the tarball into memory and probably save ourselves some work doing disk i/o we'll only throw away.