@zip.js/zip.js 2.6.65 → 2.6.67

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.
package/dist/zip-full.js CHANGED
@@ -5545,8 +5545,6 @@
5545
5545
  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5546
5546
  */
5547
5547
 
5548
- /* global crypto */
5549
-
5550
5548
  const GET_RANDOM_VALUES_SUPPORTED = typeof crypto != "undefined" && typeof crypto.getRandomValues == "function";
5551
5549
 
5552
5550
  const ERR_INVALID_PASSWORD = "Invalid password";
@@ -6623,9 +6621,6 @@
6623
6621
  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
6624
6622
  */
6625
6623
 
6626
- /* global Blob, atob, btoa, XMLHttpRequest, URL, fetch, ReadableStream, WritableStream, FileReader, TransformStream, Response */
6627
- // deno-lint-ignore-file no-this-alias
6628
-
6629
6624
  const ERR_HTTP_STATUS = "HTTP error ";
6630
6625
  const ERR_HTTP_RANGE = "HTTP Range not supported";
6631
6626
  const ERR_ITERATOR_COMPLETED_TOO_SOON = "Writer iterator completed too soon";
@@ -8360,7 +8355,7 @@
8360
8355
  await skipDiskIfNeeded(writable);
8361
8356
  fileEntry.diskNumberStart = writer.diskNumber;
8362
8357
  diskOffset = writer.diskOffset;
8363
- await blob.stream().pipeTo(writable, { preventClose: true, signal });
8358
+ await blob.stream().pipeTo(writable, { preventClose: true, preventAbort: true, signal });
8364
8359
  writable.size += blob.size;
8365
8360
  writingBufferedEntryData = false;
8366
8361
  }
@@ -8376,7 +8371,11 @@
8376
8371
  if ((bufferedWrite && writingBufferedEntryData) || (!bufferedWrite && writingEntryData)) {
8377
8372
  zipWriter.hasCorruptedEntries = true;
8378
8373
  if (error) {
8379
- error.corruptedEntry = true;
8374
+ try {
8375
+ error.corruptedEntry = true;
8376
+ } catch (_error) {
8377
+ // ignored
8378
+ }
8380
8379
  }
8381
8380
  if (bufferedWrite) {
8382
8381
  zipWriter.offset += fileWriter.writable.size;