Skip to content

Commit

Permalink
chore: replace unzipper to resolve corrupt binaries on node > v18.15
Browse files Browse the repository at this point in the history
  • Loading branch information
shumailxyz authored and TimBeyer committed Oct 5, 2023
1 parent ab79641 commit e15d500
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 244 deletions.
4 changes: 2 additions & 2 deletions core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
"typescript-memoize": "^1.1.1",
"uniqid": "^5.4.0",
"unixify": "^1.0.0",
"unzipper": "^0.10.14",
"unzip-stream": "^0.3.1",
"username": "^5.1.0",
"uuid": "^9.0.0",
"which": "^3.0.0",
Expand Down Expand Up @@ -226,7 +226,7 @@
"@types/touch": "^3.1.2",
"@types/tough-cookie": "^4.0.2",
"@types/uniqid": "^5.3.2",
"@types/unzipper": "^0.10.6",
"@types/unzip-stream": "^0.3.2",
"@types/uuid": "^9.0.1",
"@types/which": "^1.3.2",
"@types/wrap-ansi": "^3.0.0",
Expand Down
2 changes: 1 addition & 1 deletion core/src/commands/self-update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ export class SelfUpdateCommand extends Command<SelfUpdateArgs, SelfUpdateOpts> {

if (extension === "zip") {
// Note: lazy-loading for startup performance
const { Extract } = require("unzipper")
const { Extract } = require("unzip-stream")

await new Promise((_resolve, reject) => {
const extractor = Extract({ path: tempDir.path })
Expand Down
2 changes: 1 addition & 1 deletion core/src/util/ext-tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ export class PluginTool extends CliWrapper {
extractor.on("end", () => resolve())
} else if (format === "zip") {
// Note: lazy-loading for startup performance
const { Extract } = require("unzipper")
const { Extract } = require("unzip-stream")
extractor = Extract({ path: tmpPath })
extractor.on("close", () => resolve())
} else {
Expand Down
257 changes: 17 additions & 240 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e15d500

Please sign in to comment.