Skip to content

Commit

Permalink
perf: update zx-extra to v2.6.7
Browse files Browse the repository at this point in the history
  • Loading branch information
antongolub committed Feb 25, 2024
1 parent 24386af commit c910cbb
Show file tree
Hide file tree
Showing 3 changed files with 291 additions and 457 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@
"cosmiconfig": "^9.0.0",
"queuefy": "^1.2.1",
"tar-stream": "^3.1.7",
"zx-extra": "^2.6.4"
"zx-extra": "^2.6.7"
},
"devDependencies": {
"c8": "^9.1.0",
"esbuild": "^0.20.0",
"esbuild": "^0.20.1",
"uvu": "^0.5.6",
"verdaccio": "^5.29.0"
"verdaccio": "^5.29.2"
},
"publishConfig": {
"access": "public"
Expand Down
3 changes: 2 additions & 1 deletion src/main/js/api/npm.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {log} from '../log.js'
import {$, fs, INI, fetch, tempy} from 'zx-extra'
import {unzip} from '../util.js'
import {Readable} from 'node:stream'

// https://stackoverflow.com/questions/19978452/how-to-extract-single-file-from-tar-gz-archive-using-node-js

Expand All @@ -26,7 +27,7 @@ export const fetchPkg = async (pkg) => {
})
clearTimeout(timeoutId)

await unzip(tarball.body, {cwd, strip: 1, omit: ['package.json']})
await unzip(Readable.from(tarball.body), {cwd, strip: 1, omit: ['package.json']})

log({pkg})(`fetch duration '${id}': ${Date.now() - now}`)
pkg.fetched = true
Expand Down
Loading

0 comments on commit c910cbb

Please sign in to comment.