@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.
@@ -632,7 +632,7 @@ async function getFileEntry(zipWriter, name, reader, entryInfo, options) {
632
632
  if (zip64) {
633
633
  updateZip64ExtraField(fileEntry);
634
634
  }
635
- updateLocalHeader(fileEntry, localHeaderView);
635
+ updateLocalHeader(fileEntry, localHeaderView, options);
636
636
  await skipDiskIfNeeded(writable);
637
637
  await writeData(writer, localHeaderArray);
638
638
  await blob.stream().pipeTo(writable, { preventClose: true, preventAbort: true, signal });
@@ -1026,6 +1026,10 @@ function getHeaderInfo(options) {
1026
1026
  arraySet(localHeaderArray, rawExtraFieldNTFS, localHeaderOffset);
1027
1027
  localHeaderOffset += getLength(rawExtraFieldNTFS);
1028
1028
  arraySet(localHeaderArray, rawExtraField, localHeaderOffset);
1029
+ if (dataDescriptor) {
1030
+ setUint32(localHeaderView, HEADER_OFFSET_COMPRESSED_SIZE + 4, 0);
1031
+ setUint32(localHeaderView, HEADER_OFFSET_UNCOMPRESSED_SIZE + 4, 0);
1032
+ }
1029
1033
  return {
1030
1034
  localHeaderArray,
1031
1035
  localHeaderView,
@@ -1132,7 +1136,6 @@ function setEntryInfo({
1132
1136
 
1133
1137
  function updateLocalHeader({
1134
1138
  rawFilename,
1135
- dataDescriptor,
1136
1139
  encrypted,
1137
1140
  zip64,
1138
1141
  localExtraFieldZip64Length,
@@ -1145,7 +1148,7 @@ function updateLocalHeader({
1145
1148
  zip64CompressedSize,
1146
1149
  zip64Offset,
1147
1150
  zip64DiskNumberStart
1148
- }, localHeaderView) {
1151
+ }, localHeaderView, { dataDescriptor }) {
1149
1152
  if (!dataDescriptor) {
1150
1153
  if (!encrypted) {
1151
1154
  setUint32(localHeaderView, HEADER_OFFSET_SIGNATURE + 4, signature);
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.68",
6
+ "version": "2.7.69",
7
7
  "type": "module",
8
8
  "keywords": [
9
9
  "zip",
@@ -120,7 +120,7 @@
120
120
  "@rollup/plugin-node-resolve": "^16.0.1",
121
121
  "@rollup/plugin-replace": "^6.0.2",
122
122
  "@rollup/plugin-terser": "^0.4.4",
123
- "eslint": "^9.31.0",
123
+ "eslint": "^9.32.0",
124
124
  "http-server": "^14.1.1",
125
125
  "rollup": "^4.45.1",
126
126
  "typedoc": "^0.28.7",