@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.
@@ -715,26 +715,29 @@ async function exportZip(zipWriter, entry, totalSize, options) {
715
715
 
716
716
  async function processChild(child) {
717
717
  const name = options.relativePath ? child.getRelativeName(selectedEntry) : child.getFullname();
718
- let externalFileAttribute;
719
- let versionMadeBy;
720
- let comment;
721
- let lastModDate;
722
718
  let childOptions = child.options || {};
719
+ let zipEntryOptions = {};
723
720
  if (child.data instanceof Entry) {
724
- ({
721
+ const {
725
722
  externalFileAttribute,
726
723
  versionMadeBy,
727
724
  comment,
728
- lastModDate
729
- } = child.data);
725
+ lastModDate,
726
+ creationDate,
727
+ lastAccessDate
728
+ } = child.data;
729
+ zipEntryOptions = {
730
+ externalFileAttribute,
731
+ versionMadeBy,
732
+ comment,
733
+ lastModDate,
734
+ creationDate,
735
+ lastAccessDate
736
+ };
730
737
  }
731
738
  await zipWriter.add(name, child.reader, Object.assign({
732
739
  directory: child.directory
733
- }, Object.assign({}, options, {
734
- externalFileAttribute,
735
- versionMadeBy,
736
- comment,
737
- lastModDate,
740
+ }, Object.assign({}, options, zipEntryOptions, childOptions, {
738
741
  onprogress: async indexProgress => {
739
742
  if (options.onprogress) {
740
743
  entryOffsets.set(name, indexProgress);
@@ -745,7 +748,7 @@ async function exportZip(zipWriter, entry, totalSize, options) {
745
748
  }
746
749
  }
747
750
  }
748
- }, childOptions)));
751
+ })));
749
752
  await process(zipWriter, child);
750
753
  }
751
754
  }
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.23",
6
+ "version": "2.7.24",
7
7
  "type": "module",
8
8
  "keywords": [
9
9
  "zip",