@zip.js/zip.js 2.7.9 → 2.7.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -140,7 +140,8 @@ class ZipFileEntry extends ZipEntry {
140
140
  return zipEntry.data;
141
141
  } else {
142
142
  const reader = zipEntry.reader = new zipEntry.Reader(zipEntry.data, options);
143
- await Promise.all([initStream(reader), initStream(writer, zipEntry.data.uncompressedSize)]);
143
+ const uncompressedSize = zipEntry.data ? zipEntry.data.uncompressedSize : reader.size;
144
+ await Promise.all([initStream(reader), initStream(writer, uncompressedSize)]);
144
145
  const readable = reader.readable;
145
146
  readable.size = zipEntry.uncompressedSize = reader.size;
146
147
  await readable.pipeTo(writer.writable);
@@ -740,7 +741,7 @@ async function exportZip(zipWriter, entry, totalSize, options) {
740
741
  }
741
742
 
742
743
  async function addFileSystemHandle(zipEntry, handle, options) {
743
- await addFile(zipEntry, handle, []);
744
+ return addFile(zipEntry, handle, []);
744
745
 
745
746
  async function addFile(parentEntry, handle, addedEntries) {
746
747
  try {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "A JavaScript library to zip and unzip files in the browser, Deno and Node.js",
4
4
  "author": "Gildas Lormeau",
5
5
  "license": "BSD-3-Clause",
6
- "version": "2.7.9",
6
+ "version": "2.7.11",
7
7
  "type": "module",
8
8
  "keywords": [
9
9
  "zip",