diff --git a/package-lock.json b/package-lock.json index 8c33b25fdc..6c4a118285 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5289,6 +5289,11 @@ "minimatch": "^3.0.4" } }, + "immediate": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", + "integrity": "sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=" + }, "import-fresh": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", @@ -5939,11 +5944,43 @@ } }, "jszip": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/jszip/-/jszip-2.6.1.tgz", - "integrity": "sha1-uI86ey5noqBIFSmCx6N1bZxIKPA=", + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.5.0.tgz", + "integrity": "sha512-WRtu7TPCmYePR1nazfrtuF216cIVon/3GWOvHS9QR5bIwSbnxtdpma6un3jyGGNhHsKCSzn5Ypk+EkDRvTGiFA==", "requires": { - "pako": "~1.0.2" + "lie": "~3.3.0", + "pako": "~1.0.2", + "readable-stream": "~2.3.6", + "set-immediate-shim": "~1.0.1" + }, + "dependencies": { + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "just-extend": { @@ -6038,6 +6075,14 @@ "type-check": "~0.4.0" } }, + "lie": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", + "integrity": "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==", + "requires": { + "immediate": "~3.0.5" + } + }, "lighthouse-logger": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/lighthouse-logger/-/lighthouse-logger-1.2.0.tgz", @@ -8187,6 +8232,11 @@ "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true }, + "set-immediate-shim": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", + "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=" + }, "set-value": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", @@ -9957,18 +10007,18 @@ "dev": true }, "zip-dir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/zip-dir/-/zip-dir-1.0.2.tgz", - "integrity": "sha1-JT+QeurWKiGs2HIdi4gDKyQRwFE=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/zip-dir/-/zip-dir-2.0.0.tgz", + "integrity": "sha512-uhlsJZWz26FLYXOD6WVuq+fIcZ3aBPGo/cFdiLlv3KNwpa52IF3ISV8fLhQLiqVu5No3VhlqlgthN6gehil1Dg==", "requires": { - "async": "^1.5.2", - "jszip": "^2.4.0" + "async": "^3.2.0", + "jszip": "^3.2.2" }, "dependencies": { "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.0.tgz", + "integrity": "sha512-TR2mEZFVOj2pLStYxLht7TyfuRzaydfpxr3k9RpHIzMgw7A64dzsdqCxH1WJyQdoe8T10nDXd9wnEigmiuHIZw==" } } }, diff --git a/package.json b/package.json index aebdccace4..ede518df56 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,7 @@ "watchpack": "1.7.5", "ws": "7.4.3", "yargs": "16.2.0", - "zip-dir": "1.0.2" + "zip-dir": "2.0.0" }, "devDependencies": { "@babel/core": "7.12.16", diff --git a/src/cmd/build.js b/src/cmd/build.js index 0166d72460..8059ea3a5b 100644 --- a/src/cmd/build.js +++ b/src/cmd/build.js @@ -7,9 +7,9 @@ import parseJSON from 'parse-json'; import stripBom from 'strip-bom'; import stripJsonComments from 'strip-json-comments'; import defaultEventToPromise from 'event-to-promise'; +import zipDir from 'zip-dir'; import defaultSourceWatcher from '../watcher'; -import {zipDir} from '../util/zip-dir'; import getValidatedManifest, {getManifestId} from '../util/manifest'; import {prepareArtifactsDir} from '../util/artifacts'; import {createLogger} from '../util/logger'; diff --git a/src/util/zip-dir.js b/src/util/zip-dir.js deleted file mode 100644 index d5bec19c1a..0000000000 --- a/src/util/zip-dir.js +++ /dev/null @@ -1,9 +0,0 @@ -/* @flow */ -import {promisify} from 'util'; - -import zipDirModule from 'zip-dir'; - -type PromisedZipDir = - (sourceDir: string, { filter(...any): boolean }) => Promise; - -export const zipDir: PromisedZipDir = promisify(zipDirModule);