@zip.js/zip.js 2.7.23 → 2.7.24

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/index.cjs CHANGED
@@ -11425,26 +11425,29 @@ async function exportZip(zipWriter, entry, totalSize, options) {
11425
11425
 
11426
11426
  async function processChild(child) {
11427
11427
  const name = options.relativePath ? child.getRelativeName(selectedEntry) : child.getFullname();
11428
- let externalFileAttribute;
11429
- let versionMadeBy;
11430
- let comment;
11431
- let lastModDate;
11432
11428
  let childOptions = child.options || {};
11429
+ let zipEntryOptions = {};
11433
11430
  if (child.data instanceof Entry) {
11434
- ({
11431
+ const {
11432
+ externalFileAttribute,
11433
+ versionMadeBy,
11434
+ comment,
11435
+ lastModDate,
11436
+ creationDate,
11437
+ lastAccessDate
11438
+ } = child.data;
11439
+ zipEntryOptions = {
11435
11440
  externalFileAttribute,
11436
11441
  versionMadeBy,
11437
11442
  comment,
11438
- lastModDate
11439
- } = child.data);
11443
+ lastModDate,
11444
+ creationDate,
11445
+ lastAccessDate
11446
+ };
11440
11447
  }
11441
11448
  await zipWriter.add(name, child.reader, Object.assign({
11442
11449
  directory: child.directory
11443
- }, Object.assign({}, options, {
11444
- externalFileAttribute,
11445
- versionMadeBy,
11446
- comment,
11447
- lastModDate,
11450
+ }, Object.assign({}, options, zipEntryOptions, childOptions, {
11448
11451
  onprogress: async indexProgress => {
11449
11452
  if (options.onprogress) {
11450
11453
  entryOffsets.set(name, indexProgress);
@@ -11455,7 +11458,7 @@ async function exportZip(zipWriter, entry, totalSize, options) {
11455
11458
  }
11456
11459
  }
11457
11460
  }
11458
- }, childOptions)));
11461
+ })));
11459
11462
  await process(zipWriter, child);
11460
11463
  }
11461
11464
  }
package/index.d.ts CHANGED
@@ -1545,7 +1545,7 @@ export class ZipDirectoryEntry extends ZipEntry {
1545
1545
  * @returns A promise resolving to a {@link ZipFileEntry} or a {@link ZipDirectoryEntry} instance.
1546
1546
  */
1547
1547
  addFile(
1548
- file: File,
1548
+ file: File,
1549
1549
  options?: ZipWriterAddDataOptions,
1550
1550
  ): Promise<ZipEntry>;
1551
1551
  /**