odf.js 5.1.1 → 5.1.2

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,10 +4,14 @@ 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(entries) {
8
9
  const data = {};
9
- for (const [path, entry] of entries) if (entry.stored === true) data[path] = [entry.bytes, { level: 0 }];
10
- else data[path] = entry.bytes;
10
+ for (const [path, entry] of entries) if (entry.stored === true) data[path] = [entry.bytes, {
11
+ level: 0,
12
+ mtime: FIXED_ENTRY_MTIME
13
+ }];
14
+ else data[path] = [entry.bytes, { mtime: FIXED_ENTRY_MTIME }];
11
15
  return (0, fflate.zipSync)(data);
12
16
  }
13
17
  //#endregion
package/dist/zip.js CHANGED
@@ -3,10 +3,14 @@ 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(entries) {
7
8
  const data = {};
8
- for (const [path, entry] of entries) if (entry.stored === true) data[path] = [entry.bytes, { level: 0 }];
9
- else data[path] = entry.bytes;
9
+ for (const [path, entry] of entries) if (entry.stored === true) data[path] = [entry.bytes, {
10
+ level: 0,
11
+ mtime: FIXED_ENTRY_MTIME
12
+ }];
13
+ else data[path] = [entry.bytes, { mtime: FIXED_ENTRY_MTIME }];
10
14
  return zipSync(data);
11
15
  }
12
16
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "odf.js",
3
- "version": "5.1.1",
3
+ "version": "5.1.2",
4
4
  "description": "Type-safe, lossless round-trip conversion between OpenDocument Format packages (odt, ods, odp) and JSON, hand-written and dependency-minimal, built on Zod 4 codecs.",
5
5
  "type": "module",
6
6
  "repository": {