markdown-table-formatter 1.3.0 → 1.4.0
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 +6 -0
- package/lib/markdown-table-formatter.js +9 -0
- package/lib/options.js +6 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.4.0] 2022-07-25
|
|
4
|
+
|
|
5
|
+
- Add --verbose mode
|
|
6
|
+
- Dependencies: run `npm audit fix` to secure dependencies
|
|
7
|
+
- CI: Upgrade [MegaLinter](https://oxsecurity.github.io/megalinter/latest/) to v6
|
|
8
|
+
|
|
3
9
|
## [1.3.0] 2022-01-31
|
|
4
10
|
|
|
5
11
|
- Allow to override the table columns padding number of spaces using argument **--columnpadding**
|
|
@@ -21,6 +21,12 @@ class MarkdownTableFormatter {
|
|
|
21
21
|
* @return {Promise<any>} - Command result (status, stdout, stderr, childJavaProcess)
|
|
22
22
|
*/
|
|
23
23
|
async run(files, options = {}) {
|
|
24
|
+
if (options.verbose) {
|
|
25
|
+
console.info("Markdown files to analyze:");
|
|
26
|
+
for (const file of files) {
|
|
27
|
+
console.info(`- ${file}`);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
24
30
|
const fileResults = [];
|
|
25
31
|
// Read files and call prettify on each of them
|
|
26
32
|
for (const file of files) {
|
|
@@ -45,6 +51,9 @@ class MarkdownTableFormatter {
|
|
|
45
51
|
if (updated && !this.checkOnly) {
|
|
46
52
|
await fse.writeFile(file, markdownStringPrettified);
|
|
47
53
|
debug(`[updated] ${file} with:\n${markdownStringPrettified}`);
|
|
54
|
+
if (options.verbose) {
|
|
55
|
+
console.info(`- Updated file ${file}`);
|
|
56
|
+
}
|
|
48
57
|
}
|
|
49
58
|
const fileResult = {
|
|
50
59
|
file,
|
package/lib/options.js
CHANGED
|
@@ -48,6 +48,12 @@ module.exports = optionator({
|
|
|
48
48
|
type: "Boolean",
|
|
49
49
|
description: "Show version",
|
|
50
50
|
},
|
|
51
|
+
{
|
|
52
|
+
option: "verbose",
|
|
53
|
+
alias: "z",
|
|
54
|
+
type: "Boolean",
|
|
55
|
+
description: "Verbose mode",
|
|
56
|
+
},
|
|
51
57
|
],
|
|
52
58
|
mutuallyExclusive: [["check", "help", "version"]],
|
|
53
59
|
});
|