From 3c3f97677568b26acde58fbbe0641d3e97d1919c Mon Sep 17 00:00:00 2001 From: Christian Emmer <10749361+emmercm@users.noreply.github.com> Date: Wed, 17 Jul 2024 16:34:14 -0700 Subject: [PATCH] Fix: ZJONSSON/node-unzipper#324 (#1220) --- package-lock.json | 18 ++++++++---------- package.json | 2 +- src/types/files/archives/zip.ts | 5 +---- 3 files changed, 10 insertions(+), 15 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9c2a493be..674765031 100644 --- a/package-lock.json +++ b/package-lock.json @@ -38,7 +38,7 @@ "term-size": "4.0.0", "trash": "8.1.1", "typescript-memoize": "1.1.1", - "unzipper": "0.12.1", + "unzipper": "0.12.2", "wrap-ansi": "8.1.0", "xml2js": "0.6.2", "yargs": "17.7.2" @@ -3523,10 +3523,9 @@ } }, "node_modules/bluebird": { - "version": "3.4.7", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.4.7.tgz", - "integrity": "sha512-iD3898SR7sWVRHbiQv+sHUtHnMvC1o3nW5rAcqnq3uOn07DSAppZYUkIGslDz6gXC7HfunPe7YVBgoEJASPcHA==", - "license": "MIT" + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" }, "node_modules/brace-expansion": { "version": "2.0.1", @@ -11545,12 +11544,11 @@ } }, "node_modules/unzipper": { - "version": "0.12.1", - "resolved": "https://registry.npmjs.org/unzipper/-/unzipper-0.12.1.tgz", - "integrity": "sha512-wjYe5XddA387WIAZbEMWOT0U8kw9yf1MdfLHccJer1y7a80t3DqVv0SHOAWV5NDBD2TUPj/pFYmK9tCeY6l9UQ==", - "license": "MIT", + "version": "0.12.2", + "resolved": "https://registry.npmjs.org/unzipper/-/unzipper-0.12.2.tgz", + "integrity": "sha512-ecRhBc+ZfQkYnRr8L7OkxvAAWDkqP3Dun9CHUmYYZx/mErGdy7N7ju6ODJ7uKmm9PD99aAG8grxzl5y9lmEK2A==", "dependencies": { - "bluebird": "~3.4.1", + "bluebird": "~3.7.2", "duplexer2": "~0.1.4", "fs-extra": "^11.2.0", "graceful-fs": "^4.2.2", diff --git a/package.json b/package.json index d3d0c5b3f..0e4bf27d5 100644 --- a/package.json +++ b/package.json @@ -96,7 +96,7 @@ "term-size": "4.0.0", "trash": "8.1.1", "typescript-memoize": "1.1.1", - "unzipper": "0.12.1", + "unzipper": "0.12.2", "wrap-ansi": "8.1.0", "xml2js": "0.6.2", "yargs": "17.7.2" diff --git a/src/types/files/archives/zip.ts b/src/types/files/archives/zip.ts index 520f3e81b..396ca60ed 100644 --- a/src/types/files/archives/zip.ts +++ b/src/types/files/archives/zip.ts @@ -46,10 +46,7 @@ export default class Zip extends Archive { const archive = await unzipper.Open.file(this.getFilePath()); return async.mapLimit( - archive.files - .filter((entryFile) => entryFile.type === 'File') - // https://github.com/ZJONSSON/node-unzipper/issues/324 - .filter((entryFile) => typeof entryFile.offsetToLocalFileHeader === 'number'), + archive.files.filter((entryFile) => entryFile.type === 'File'), Defaults.ARCHIVE_ENTRY_SCANNER_THREADS_PER_ARCHIVE, async (entryFile, callback: AsyncResultCallback, Error>) => { let checksums: ChecksumProps = {};