ooxml.js 4.4.2 → 4.4.3

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.cjs CHANGED
@@ -4,8 +4,11 @@ let fflate = require("fflate");
4
4
  function unzipPackage(bytes) {
5
5
  return (0, fflate.unzipSync)(bytes);
6
6
  }
7
+ const FIXED_ENTRY_MTIME = new Date(Date.UTC(1980, 0, 1, 0, 0, 0));
7
8
  function zipPackage(parts) {
8
- return (0, fflate.zipSync)(parts);
9
+ const data = {};
10
+ for (const [path, bytes] of Object.entries(parts)) data[path] = [bytes, { mtime: FIXED_ENTRY_MTIME }];
11
+ return (0, fflate.zipSync)(data);
9
12
  }
10
13
  //#endregion
11
14
  exports.unzipPackage = unzipPackage;
package/dist/zip.js CHANGED
@@ -3,8 +3,11 @@ import { unzipSync, zipSync } from "fflate";
3
3
  function unzipPackage(bytes) {
4
4
  return unzipSync(bytes);
5
5
  }
6
+ const FIXED_ENTRY_MTIME = new Date(Date.UTC(1980, 0, 1, 0, 0, 0));
6
7
  function zipPackage(parts) {
7
- return zipSync(parts);
8
+ const data = {};
9
+ for (const [path, bytes] of Object.entries(parts)) data[path] = [bytes, { mtime: FIXED_ENTRY_MTIME }];
10
+ return zipSync(data);
8
11
  }
9
12
  //#endregion
10
13
  export { unzipPackage, zipPackage };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ooxml.js",
3
- "version": "4.4.2",
3
+ "version": "4.4.3",
4
4
  "description": "Type-safe, lossless round-trip conversion between OOXML packages (docx, pptx, xlsx) and JSON, built on Zod 4 codecs.",
5
5
  "type": "module",
6
6
  "repository": {