marked 9.0.3 → 9.1.1

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/bin/main.js CHANGED
@@ -62,6 +62,7 @@ export async function main(nodeProcess) {
62
62
  let tokens;
63
63
  let config;
64
64
  let opt;
65
+ let noclobber;
65
66
 
66
67
  function getArg() {
67
68
  let arg = argv.shift();
@@ -114,6 +115,10 @@ export async function main(nodeProcess) {
114
115
  case '--config':
115
116
  config = argv.shift();
116
117
  break;
118
+ case '-n':
119
+ case '--no-clobber':
120
+ noclobber = true;
121
+ break;
117
122
  case '-h':
118
123
  case '--help':
119
124
  return await help();
@@ -216,6 +221,10 @@ export async function main(nodeProcess) {
216
221
  : await marked.parse(data, options);
217
222
 
218
223
  if (output) {
224
+ if (noclobber && await fileExists(output)) {
225
+ nodeProcess.stderr.write('marked: output file \'' + output + '\' already exists, disable the \'-n\' / \'--no-clobber\' flag to overwrite\n');
226
+ nodeProcess.exit(1);
227
+ }
219
228
  return await writeFile(output, html);
220
229
  }
221
230
 
package/lib/marked.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * marked v9.0.3 - a markdown parser
2
+ * marked v9.1.1 - a markdown parser
3
3
  * Copyright (c) 2011-2023, Christopher Jeffrey. (MIT Licensed)
4
4
  * https://github.com/markedjs/marked
5
5
  */
package/lib/marked.esm.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * marked v9.0.3 - a markdown parser
2
+ * marked v9.1.1 - a markdown parser
3
3
  * Copyright (c) 2011-2023, Christopher Jeffrey. (MIT Licensed)
4
4
  * https://github.com/markedjs/marked
5
5
  */
package/lib/marked.umd.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * marked v9.0.3 - a markdown parser
2
+ * marked v9.1.1 - a markdown parser
3
3
  * Copyright (c) 2011-2023, Christopher Jeffrey. (MIT Licensed)
4
4
  * https://github.com/markedjs/marked
5
5
  */
package/man/marked.1 CHANGED
@@ -1,9 +1,9 @@
1
- .TH "MARKED" "1" "September 2023" "9.0.2"
1
+ .TH "MARKED" "1" "October 2023" "9.1.0"
2
2
  .SH "NAME"
3
3
  \fBmarked\fR \- a javascript markdown parser
4
4
  .SH SYNOPSIS
5
5
  .P
6
- \fBmarked\fP [\fB\-o\fP <output file>] [\fB\-i\fP <input file>] [\fB\-s\fP <markdown string>] [\fB\-c\fP <config file>] [\fB\-\-help\fP] [\fB\-\-version\fP] [\fB\-\-tokens\fP] [\fB\-\-pedantic\fP] [\fB\-\-gfm\fP] [\fB\-\-breaks\fP] [\fB\-\-no\-etc\.\.\.\fP] [\fB\-\-silent\fP] [filename]
6
+ \fBmarked\fP [\fB\-o\fP <output file>] [\fB\-i\fP <input file>] [\fB\-s\fP <markdown string>] [\fB\-c\fP <config file>] [\fB\-\-help\fP] [\fB\-\-version\fP] [\fB\-\-tokens\fP] [\fB\-\-no\-clobber\fP] [\fB\-\-pedantic\fP] [\fB\-\-gfm\fP] [\fB\-\-breaks\fP] [\fB\-\-no\-etc\.\.\.\fP] [\fB\-\-silent\fP] [filename]
7
7
  .SH DESCRIPTION
8
8
  .P
9
9
  marked is a full\-featured javascript markdown parser, built for speed\.
@@ -56,6 +56,10 @@ Specify config file to use instead of the default \fB~/\.marked\.json\fP or \fB~
56
56
  .br
57
57
  Output a token list instead of html\.
58
58
  .IP \(bu 2
59
+ \-n, \-\-no\-clobber
60
+ .br
61
+ Do not overwrite \fBoutput\fP if it exists\.
62
+ .IP \(bu 2
59
63
  \-\-pedantic
60
64
  .br
61
65
  Conform to obscure parts of markdown\.pl as much as possible\.
package/man/marked.1.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## SYNOPSIS
4
4
 
5
- `marked` [`-o` <output file>] [`-i` <input file>] [`-s` <markdown string>] [`-c` <config file>] [`--help`] [`--version`] [`--tokens`] [`--pedantic`] [`--gfm`] [`--breaks`] [`--no-etc...`] [`--silent`] [filename]
5
+ `marked` [`-o` <output file>] [`-i` <input file>] [`-s` <markdown string>] [`-c` <config file>] [`--help`] [`--version`] [`--tokens`] [`--no-clobber`] [`--pedantic`] [`--gfm`] [`--breaks`] [`--no-etc...`] [`--silent`] [filename]
6
6
 
7
7
  ## DESCRIPTION
8
8
 
@@ -45,6 +45,9 @@ Specify config file to use instead of the default `~/.marked.json` or `~/.marked
45
45
  * -t, --tokens
46
46
  Output a token list instead of html.
47
47
 
48
+ * -n, --no-clobber
49
+ Do not overwrite `output` if it exists.
50
+
48
51
  * --pedantic
49
52
  Conform to obscure parts of markdown.pl as much as possible.
50
53
  Don't fix original markdown bugs.
package/marked.min.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * marked v9.0.3 - a markdown parser
2
+ * marked v9.1.1 - a markdown parser
3
3
  * Copyright (c) 2011-2023, Christopher Jeffrey. (MIT Licensed)
4
4
  * https://github.com/markedjs/marked
5
5
  */
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": "9.0.3",
5
+ "version": "9.1.1",
6
6
  "type": "module",
7
7
  "main": "./lib/marked.cjs",
8
8
  "module": "./lib/marked.esm.js",
@@ -25,6 +25,7 @@
25
25
  "default": "./lib/marked.cjs"
26
26
  },
27
27
  "./bin/marked": "./bin/marked.js",
28
+ "./marked.min.js": "./marked.min.js",
28
29
  "./package.json": "./package.json"
29
30
  },
30
31
  "repository": "git://github.com/markedjs/marked.git",
@@ -45,33 +46,33 @@
45
46
  ],
46
47
  "devDependencies": {
47
48
  "@markedjs/html-differ": "^4.0.2",
48
- "@rollup/plugin-terser": "^0.4.3",
49
- "@rollup/plugin-typescript": "^11.1.3",
49
+ "@rollup/plugin-terser": "^0.4.4",
50
+ "@rollup/plugin-typescript": "^11.1.5",
50
51
  "@semantic-release/commit-analyzer": "^11.0.0",
51
52
  "@semantic-release/git": "^10.0.1",
52
- "@semantic-release/github": "^9.0.5",
53
+ "@semantic-release/github": "^9.2.1",
53
54
  "@semantic-release/npm": "^11.0.0",
54
55
  "@semantic-release/release-notes-generator": "^12.0.0",
55
- "@typescript-eslint/eslint-plugin": "^6.6.0",
56
- "@typescript-eslint/parser": "^6.6.0",
56
+ "@typescript-eslint/eslint-plugin": "^6.7.4",
57
+ "@typescript-eslint/parser": "^6.7.4",
57
58
  "cheerio": "^1.0.0-rc.12",
58
59
  "commonmark": "0.30.0",
59
60
  "cross-env": "^7.0.3",
60
- "eslint": "^8.48.0",
61
+ "eslint": "^8.50.0",
61
62
  "eslint-config-standard": "^17.1.0",
62
63
  "eslint-plugin-import": "^2.28.1",
63
64
  "eslint-plugin-n": "^16.1.0",
64
65
  "eslint-plugin-promise": "^6.1.1",
65
66
  "front-matter": "^4.0.2",
66
- "highlight.js": "^11.8.0",
67
+ "highlight.js": "^11.9.0",
67
68
  "jasmine": "^5.1.0",
68
- "markdown-it": "13.0.1",
69
+ "markdown-it": "13.0.2",
69
70
  "marked-highlight": "^2.0.6",
70
71
  "marked-man": "^1.3.4",
71
72
  "node-fetch": "^3.3.2",
72
73
  "recheck": "^4.4.5",
73
- "rollup": "^3.29.2",
74
- "semantic-release": "^22.0.0",
74
+ "rollup": "^4.0.2",
75
+ "semantic-release": "^22.0.5",
75
76
  "titleize": "^4.0.0",
76
77
  "ts-expect": "^1.3.0",
77
78
  "ts-node": "^10.9.1",