@adobe/helix-md2docx 1.0.2 → 1.0.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/CHANGELOG.md +7 -0
- package/package.json +2 -2
- package/src/cli/convert2docx.js +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [1.0.3](https://github.com/adobe/helix-md2docx/compare/v1.0.2...v1.0.3) (2022-01-19)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* invalid imports in the cli ([33d698d](https://github.com/adobe/helix-md2docx/commit/33d698d10144a5c9383256a847634e42b8c7f0c8))
|
|
7
|
+
|
|
1
8
|
## [1.0.2](https://github.com/adobe/helix-md2docx/compare/v1.0.1...v1.0.2) (2022-01-17)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/helix-md2docx",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Helix Service that converts markdown to word documents",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"c8": "7.11.0",
|
|
52
52
|
"chai": "4.3.4",
|
|
53
53
|
"codecov": "3.8.3",
|
|
54
|
-
"dotenv": "
|
|
54
|
+
"dotenv": "14.1.0",
|
|
55
55
|
"eslint": "8.6.0",
|
|
56
56
|
"eslint-plugin-header": "3.1.1",
|
|
57
57
|
"eslint-plugin-import": "2.25.4",
|
package/src/cli/convert2docx.js
CHANGED
|
@@ -12,16 +12,16 @@
|
|
|
12
12
|
|
|
13
13
|
/* eslint-disable no-await-in-loop,no-console */
|
|
14
14
|
import {
|
|
15
|
-
|
|
15
|
+
readdir, readFile, stat, writeFile,
|
|
16
16
|
} from 'fs/promises';
|
|
17
17
|
import path from 'path';
|
|
18
|
-
import unified from 'unified';
|
|
18
|
+
import { unified } from 'unified';
|
|
19
19
|
import remark from 'remark-parse';
|
|
20
20
|
import gfm from 'remark-gfm';
|
|
21
21
|
import { remarkMatter } from '@adobe/helix-markdown-support';
|
|
22
22
|
import { MediaHandler } from '@adobe/helix-mediahandler';
|
|
23
23
|
import { docx2md } from '@adobe/helix-docx2md';
|
|
24
|
-
import mdast2docx from '../
|
|
24
|
+
import { mdast2docx } from '../index.js';
|
|
25
25
|
|
|
26
26
|
class MockMediaHandler extends MediaHandler {
|
|
27
27
|
constructor(params) {
|
|
@@ -57,7 +57,7 @@ async function run(filePath) {
|
|
|
57
57
|
filePath = path.resolve(process.cwd(), filePath);
|
|
58
58
|
const files = [];
|
|
59
59
|
if ((await stat(filePath)).isDirectory()) {
|
|
60
|
-
files.push(...await
|
|
60
|
+
files.push(...await readdir(filePath));
|
|
61
61
|
} else {
|
|
62
62
|
files.push(filePath);
|
|
63
63
|
}
|