@zip.js/zip.js 2.7.68 → 2.7.69

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/deno.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zip-js/zip-js",
3
- "version": "2.7.68",
3
+ "version": "2.7.69",
4
4
  "exports": {
5
5
  ".": "./index.js",
6
6
  "./data-uri": "./lib/zip-data-uri.js"
@@ -10514,7 +10514,7 @@
10514
10514
  if (zip64) {
10515
10515
  updateZip64ExtraField(fileEntry);
10516
10516
  }
10517
- updateLocalHeader(fileEntry, localHeaderView);
10517
+ updateLocalHeader(fileEntry, localHeaderView, options);
10518
10518
  await skipDiskIfNeeded(writable);
10519
10519
  await writeData(writer, localHeaderArray);
10520
10520
  await blob.stream().pipeTo(writable, { preventClose: true, preventAbort: true, signal });
@@ -10908,6 +10908,10 @@
10908
10908
  arraySet(localHeaderArray, rawExtraFieldNTFS, localHeaderOffset);
10909
10909
  localHeaderOffset += getLength(rawExtraFieldNTFS);
10910
10910
  arraySet(localHeaderArray, rawExtraField, localHeaderOffset);
10911
+ if (dataDescriptor) {
10912
+ setUint32(localHeaderView, HEADER_OFFSET_COMPRESSED_SIZE + 4, 0);
10913
+ setUint32(localHeaderView, HEADER_OFFSET_UNCOMPRESSED_SIZE + 4, 0);
10914
+ }
10911
10915
  return {
10912
10916
  localHeaderArray,
10913
10917
  localHeaderView,
@@ -11014,7 +11018,6 @@
11014
11018
 
11015
11019
  function updateLocalHeader({
11016
11020
  rawFilename,
11017
- dataDescriptor,
11018
11021
  encrypted,
11019
11022
  zip64,
11020
11023
  localExtraFieldZip64Length,
@@ -11027,7 +11030,7 @@
11027
11030
  zip64CompressedSize,
11028
11031
  zip64Offset,
11029
11032
  zip64DiskNumberStart
11030
- }, localHeaderView) {
11033
+ }, localHeaderView, { dataDescriptor }) {
11031
11034
  if (!dataDescriptor) {
11032
11035
  if (!encrypted) {
11033
11036
  setUint32(localHeaderView, HEADER_OFFSET_SIGNATURE + 4, signature);