marked 4.0.3 → 4.0.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.
Files changed (2) hide show
  1. package/bin/marked.js +11 -5
  2. package/package.json +4 -4
package/bin/marked.js CHANGED
@@ -27,10 +27,16 @@ async function help() {
27
27
  const { dirname, resolve } = await import('path');
28
28
  const { fileURLToPath } = await import('url');
29
29
  const __dirname = dirname(fileURLToPath(import.meta.url));
30
- spawn('man', [resolve(__dirname, '../man/marked.1')], options)
31
- .on('error', async() => {
32
- console.log(await readFile(resolve(__dirname, '../man/marked.1.txt'), 'utf8'));
33
- });
30
+ const helpText = await readFile(resolve(__dirname, '../man/marked.1.txt'), 'utf8');
31
+
32
+ // eslint-disable-next-line promise/param-names
33
+ await new Promise(res => {
34
+ spawn('man', [resolve(__dirname, '../man/marked.1')], options)
35
+ .on('error', () => {
36
+ console.log(helpText);
37
+ })
38
+ .on('close', res);
39
+ });
34
40
  }
35
41
 
36
42
  async function version() {
@@ -149,7 +155,7 @@ async function main(argv) {
149
155
  : marked(data, options);
150
156
 
151
157
  if (output) {
152
- return await writeFile(output, data);
158
+ return await writeFile(output, html);
153
159
  }
154
160
 
155
161
  process.stdout.write(html + '\n');
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "marked",
3
3
  "description": "A markdown parser built for speed",
4
4
  "author": "Christopher Jeffrey",
5
- "version": "4.0.3",
5
+ "version": "4.0.4",
6
6
  "type": "module",
7
7
  "main": "./lib/marked.cjs",
8
8
  "module": "./lib/marked.esm.js",
@@ -56,15 +56,15 @@
56
56
  "commonmark": "0.30.0",
57
57
  "eslint": "^8.2.0",
58
58
  "eslint-config-standard": "^16.0.3",
59
- "eslint-plugin-import": "^2.25.2",
59
+ "eslint-plugin-import": "^2.25.3",
60
60
  "eslint-plugin-node": "^11.1.0",
61
61
  "eslint-plugin-promise": "^5.1.1",
62
62
  "front-matter": "^4.0.2",
63
63
  "highlight.js": "^11.3.1",
64
64
  "jasmine": "^3.10.0",
65
65
  "markdown-it": "12.2.0",
66
- "node-fetch": "^3.0.0",
67
- "rollup": "^2.59.0",
66
+ "node-fetch": "^3.1.0",
67
+ "rollup": "^2.60.0",
68
68
  "rollup-plugin-license": "^2.6.0",
69
69
  "semantic-release": "^18.0.0",
70
70
  "titleize": "^3.0.0",