@adobe/helix-docx2md 1.6.1 → 1.6.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/CHANGELOG.md +7 -0
- package/package.json +5 -5
- package/src/docx2dast/zipfile.js +7 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [1.6.2](https://github.com/adobe/helix-docx2md/compare/v1.6.1...v1.6.2) (2024-06-28)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* resolve relationships correctly ([#482](https://github.com/adobe/helix-docx2md/issues/482)) ([5625564](https://github.com/adobe/helix-docx2md/commit/5625564a7d1be2b1c650e46784225f1c075db8fd))
|
|
7
|
+
|
|
1
8
|
## [1.6.1](https://github.com/adobe/helix-docx2md/compare/v1.6.0...v1.6.1) (2024-06-22)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/helix-docx2md",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.2",
|
|
4
4
|
"description": "Helix library that converts word documents to markdown",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -53,10 +53,10 @@
|
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@adobe/eslint-config-helix": "2.0.6",
|
|
56
|
-
"@adobe/helix-admin-support": "2.8.
|
|
57
|
-
"@adobe/helix-mediahandler": "2.5.
|
|
58
|
-
"@adobe/helix-onedrive-support": "11.3.
|
|
59
|
-
"@adobe/helix-shared-tokencache": "1.4.
|
|
56
|
+
"@adobe/helix-admin-support": "2.8.17",
|
|
57
|
+
"@adobe/helix-mediahandler": "2.5.11",
|
|
58
|
+
"@adobe/helix-onedrive-support": "11.3.37",
|
|
59
|
+
"@adobe/helix-shared-tokencache": "1.4.15",
|
|
60
60
|
"@semantic-release/changelog": "6.0.3",
|
|
61
61
|
"@semantic-release/exec": "6.0.3",
|
|
62
62
|
"@semantic-release/git": "10.0.1",
|
package/src/docx2dast/zipfile.js
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
import yauzl from 'yauzl';
|
|
13
13
|
import promises from '@adobe/mammoth/lib/promises.js';
|
|
14
14
|
import { joinPath, splitPath } from '@adobe/mammoth/lib/zipfile.js';
|
|
15
|
+
import path from 'path';
|
|
15
16
|
|
|
16
17
|
/**
|
|
17
18
|
* Custom implementation of zipfiles, supporting streaming.
|
|
@@ -34,12 +35,16 @@ export function openArrayBuffer(arrayBuffer) {
|
|
|
34
35
|
entries.set(entry.fileName, entry);
|
|
35
36
|
});
|
|
36
37
|
|
|
38
|
+
function getEntry(name) {
|
|
39
|
+
return entries.get(path.join(name));
|
|
40
|
+
}
|
|
41
|
+
|
|
37
42
|
function exists(name) {
|
|
38
|
-
return
|
|
43
|
+
return !!getEntry(name);
|
|
39
44
|
}
|
|
40
45
|
|
|
41
46
|
function read(name, encoding, asContentSource) {
|
|
42
|
-
const entry =
|
|
47
|
+
const entry = getEntry(name);
|
|
43
48
|
if (!entry) {
|
|
44
49
|
return promises.reject(Error(`No such file ${name}`));
|
|
45
50
|
}
|