ooxml.js 4.4.2 → 4.4.4
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 +4 -1
- package/dist/zip.js +4 -1
- package/package.json +2 -2
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
|
-
|
|
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
|
-
|
|
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.
|
|
3
|
+
"version": "4.4.4",
|
|
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": {
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"license": "MIT",
|
|
81
81
|
"packageManager": "pnpm@11.6.0",
|
|
82
82
|
"dependencies": {
|
|
83
|
-
"archive-codec": "^1.1.
|
|
83
|
+
"archive-codec": "^1.1.1",
|
|
84
84
|
"document-schema.js": "^4.8.0",
|
|
85
85
|
"fast-xml-parser": "^5.10.1",
|
|
86
86
|
"fflate": "^0.8.3",
|