diff --git a/package.json b/package.json index 30ed28ac51672..947ec6bd4ee45 100644 --- a/package.json +++ b/package.json @@ -103,7 +103,7 @@ "vscode-oniguruma": "1.7.0", "vscode-regexpp": "^3.1.0", "vscode-textmate": "9.0.0", - "yauzl": "^2.9.2", + "yauzl": "^3.0.0", "yazl": "^2.4.3" }, "devDependencies": { @@ -127,7 +127,7 @@ "@types/wicg-file-system-access": "^2020.9.6", "@types/windows-foreground-love": "^0.3.0", "@types/winreg": "^1.2.30", - "@types/yauzl": "^2.9.1", + "@types/yauzl": "^2.10.0", "@types/yazl": "^2.4.2", "@typescript-eslint/eslint-plugin": "^5.57.0", "@typescript-eslint/experimental-utils": "^5.57.0", diff --git a/remote/package.json b/remote/package.json index 1d341b00a2062..a3af2b99fe4c5 100644 --- a/remote/package.json +++ b/remote/package.json @@ -34,7 +34,7 @@ "vscode-oniguruma": "1.7.0", "vscode-regexpp": "^3.1.0", "vscode-textmate": "9.0.0", - "yauzl": "^2.9.2", + "yauzl": "^3.0.0", "yazl": "^2.4.3" } } diff --git a/remote/yarn.lock b/remote/yarn.lock index 5fdbd0988ea21..bcd7160cadc6e 100644 --- a/remote/yarn.lock +++ b/remote/yarn.lock @@ -643,6 +643,14 @@ yauzl@^2.9.2: buffer-crc32 "~0.2.3" fd-slicer "~1.1.0" +yauzl@^3.0.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-3.1.1.tgz#d85503cc34933c0bcb3646ee2b97afedbebe32e7" + integrity sha512-MPxA7oN5cvGV0wzfkeHKF2/+Q4TkMpHSWGRy/96I4Cozljmx0ph91+Muxh6HegEtDC4GftJ8qYDE51vghFiEYA== + dependencies: + buffer-crc32 "~0.2.3" + pend "~1.2.0" + yazl@^2.4.3: version "2.4.3" resolved "https://registry.yarnpkg.com/yazl/-/yazl-2.4.3.tgz#ec26e5cc87d5601b9df8432dbdd3cd2e5173a071" diff --git a/src/vs/base/node/zip.ts b/src/vs/base/node/zip.ts index 3cb7bc9795b4f..c0d9b4b8ecbd1 100644 --- a/src/vs/base/node/zip.ts +++ b/src/vs/base/node/zip.ts @@ -164,7 +164,7 @@ async function openZip(zipFile: string, lazy: boolean = false): Promise const { open } = await import('yauzl'); return new Promise((resolve, reject) => { - open(zipFile, lazy ? { lazyEntries: true } : undefined!, (error?: Error, zipfile?: ZipFile) => { + open(zipFile, lazy ? { lazyEntries: true } : undefined!, (error: Error | null, zipfile?: ZipFile) => { if (error) { reject(toExtractError(error)); } else { @@ -176,7 +176,7 @@ async function openZip(zipFile: string, lazy: boolean = false): Promise function openZipStream(zipFile: ZipFile, entry: Entry): Promise { return new Promise((resolve, reject) => { - zipFile.openReadStream(entry, (error?: Error, stream?: Readable) => { + zipFile.openReadStream(entry, (error: Error | null, stream?: Readable) => { if (error) { reject(toExtractError(error)); } else { diff --git a/yarn.lock b/yarn.lock index 056c1e1bce0f9..f434a0d1e6ae3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1255,6 +1255,13 @@ resolved "https://registry.yarnpkg.com/@types/winreg/-/winreg-1.2.30.tgz#91d6710e536d345b9c9b017c574cf6a8da64c518" integrity sha1-kdZxDlNtNFucmwF8V0z2qNpkxRg= +"@types/yauzl@^2.10.0": + version "2.10.3" + resolved "https://registry.yarnpkg.com/@types/yauzl/-/yauzl-2.10.3.tgz#e9b2808b4f109504a03cda958259876f61017999" + integrity sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q== + dependencies: + "@types/node" "*" + "@types/yauzl@^2.9.1": version "2.9.1" resolved "https://registry.yarnpkg.com/@types/yauzl/-/yauzl-2.9.1.tgz#d10f69f9f522eef3cf98e30afb684a1e1ec923af" @@ -10464,6 +10471,14 @@ yauzl@^2.2.1: buffer-crc32 "~0.2.3" fd-slicer "~1.0.1" +yauzl@^3.0.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-3.1.1.tgz#d85503cc34933c0bcb3646ee2b97afedbebe32e7" + integrity sha512-MPxA7oN5cvGV0wzfkeHKF2/+Q4TkMpHSWGRy/96I4Cozljmx0ph91+Muxh6HegEtDC4GftJ8qYDE51vghFiEYA== + dependencies: + buffer-crc32 "~0.2.3" + pend "~1.2.0" + yazl@^2.2.1, yazl@^2.4.3: version "2.4.3" resolved "https://registry.yarnpkg.com/yazl/-/yazl-2.4.3.tgz#ec26e5cc87d5601b9df8432dbdd3cd2e5173a071"