markdown-table-formatter 1.4.0 → 1.5.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/README.md +21 -16
- package/lib/cli.js +3 -3
- package/lib/markdown-table-formatter.js +1 -1
- package/package.json +11 -11
- package/CHANGELOG.md +0 -34
package/README.md
CHANGED
|
@@ -16,6 +16,19 @@ Format markdown tables in files, using embedded [markdown-table-prettify](https:
|
|
|
16
16
|
|
|
17
17
|
[](https://github.com/nvuillam/markdown-table-formatter#readme)
|
|
18
18
|
|
|
19
|
+
## Table of contents
|
|
20
|
+
|
|
21
|
+
- [Installation](#installation)
|
|
22
|
+
- [Local](#local)
|
|
23
|
+
- [Global](#global)
|
|
24
|
+
- [Usage](#usage)
|
|
25
|
+
- [Options](#options)
|
|
26
|
+
- [Examples](#examples)
|
|
27
|
+
- [Continuous Integration](#continuous-integration)
|
|
28
|
+
- [Ignoring Code Blocks](#ignoring-code-blocks)
|
|
29
|
+
- [Contribute](#contribute)
|
|
30
|
+
- [Release notes](#release-notes)
|
|
31
|
+
|
|
19
32
|
## Installation
|
|
20
33
|
|
|
21
34
|
### Local
|
|
@@ -87,28 +100,20 @@ You can see **more examples in** [**test methods**](https://github.com/nvuillam/
|
|
|
87
100
|
|
|
88
101
|
## Continuous Integration
|
|
89
102
|
|
|
90
|
-
You can automatically check markdown tables formatting and fix it using [
|
|
91
|
-
|
|
92
|
-
## CONTRIBUTE
|
|
103
|
+
You can automatically check markdown tables formatting and fix it using [MegaLinter](https://github.com/oxsecurity/megalinter/), that embeds markdown-table-formatter out of the box
|
|
93
104
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
Please follow [Contribution instructions](https://github.com/nvuillam/markdown-table-formatter/blob/master/CONTRIBUTING.md)
|
|
105
|
+
## Ignoring Code Blocks
|
|
97
106
|
|
|
98
|
-
|
|
107
|
+
You may wish to ignore specific markdown content, especially when using with [Megalinter](https://github.com/oxsecurity/megalinter) or [terraform-docs](https://github.com/terraform-docs/terraform-docs)
|
|
99
108
|
|
|
100
|
-
|
|
109
|
+
To achieve this, place tags `<!-- markdown-table-prettify-ignore-start -->` and `<!-- markdown-table-prettify-ignore-end -->` around the content you want markdown-table-formatter to ignore.
|
|
101
110
|
|
|
102
|
-
|
|
111
|
+
## Contribute
|
|
103
112
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
- First working version :)
|
|
107
|
-
|
|
108
|
-
## [0.0.1] 2021-01-13
|
|
113
|
+
Contributions are very welcome !
|
|
109
114
|
|
|
110
|
-
|
|
115
|
+
Please follow [Contribution instructions](https://github.com/nvuillam/markdown-table-formatter/blob/master/CONTRIBUTING.md)
|
|
111
116
|
|
|
112
|
-
|
|
117
|
+
## Release Notes
|
|
113
118
|
|
|
114
119
|
See complete [CHANGELOG](https://github.com/nvuillam/markdown-table-formatter/blob/master/CHANGELOG.md)
|
package/lib/cli.js
CHANGED
|
@@ -33,7 +33,7 @@ class MarkdownTableFormatterCli {
|
|
|
33
33
|
let helpContent = "";
|
|
34
34
|
if (this.options._.length) {
|
|
35
35
|
helpContent = optionsDefinition.generateHelpForOption(
|
|
36
|
-
this.options._[0]
|
|
36
|
+
this.options._[0],
|
|
37
37
|
);
|
|
38
38
|
} else {
|
|
39
39
|
helpContent = optionsDefinition.generateHelp();
|
|
@@ -60,13 +60,13 @@ class MarkdownTableFormatterCli {
|
|
|
60
60
|
console.log(
|
|
61
61
|
`Formatted markdown tables in ${
|
|
62
62
|
updates.length
|
|
63
|
-
} files:\n- ${updates.join("\n- ")}
|
|
63
|
+
} files:\n- ${updates.join("\n- ")}`,
|
|
64
64
|
);
|
|
65
65
|
} else if (status === 1) {
|
|
66
66
|
console.log(
|
|
67
67
|
`${
|
|
68
68
|
updates.length
|
|
69
|
-
} files contain markdown tables to format:\n- ${updates.join("\n- ")}
|
|
69
|
+
} files contain markdown tables to format:\n- ${updates.join("\n- ")}`,
|
|
70
70
|
);
|
|
71
71
|
}
|
|
72
72
|
process.exitCode = status;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "markdown-table-formatter",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "Format markdown tables in files",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"files": [
|
|
@@ -33,23 +33,23 @@
|
|
|
33
33
|
},
|
|
34
34
|
"homepage": "https://github.com/nvuillam/markdown-table-formatter#readme",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"debug": "^4.
|
|
36
|
+
"debug": "^4.3.4",
|
|
37
37
|
"find-package-json": "^1.2.0",
|
|
38
|
-
"fs-extra": "^
|
|
39
|
-
"glob": "^
|
|
38
|
+
"fs-extra": "^11.1.1",
|
|
39
|
+
"glob": "^10.3.10",
|
|
40
40
|
"markdown-table-prettify": "^3.6.0",
|
|
41
|
-
"optionator": "^0.9.
|
|
41
|
+
"optionator": "^0.9.3"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@babel/eslint-parser": "^7.
|
|
45
|
-
"eslint": "^
|
|
46
|
-
"mega-linter-runner": "^
|
|
47
|
-
"mocha": "^
|
|
44
|
+
"@babel/eslint-parser": "^7.23.3",
|
|
45
|
+
"eslint": "^8.54.0",
|
|
46
|
+
"mega-linter-runner": "^7.6.0",
|
|
47
|
+
"mocha": "^10.2.0",
|
|
48
48
|
"nyc": "^15.1.0",
|
|
49
|
-
"which": "^
|
|
49
|
+
"which": "^4.0.0"
|
|
50
50
|
},
|
|
51
51
|
"engines": {
|
|
52
|
-
"node": ">=
|
|
52
|
+
"node": ">=16.0.0"
|
|
53
53
|
},
|
|
54
54
|
"mocha": {
|
|
55
55
|
"require": [
|
package/CHANGELOG.md
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
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
|
-
|
|
9
|
-
## [1.3.0] 2022-01-31
|
|
10
|
-
|
|
11
|
-
- Allow to override the table columns padding number of spaces using argument **--columnpadding**
|
|
12
|
-
- CI: Upgrade MegaLinter to v5 + fix CI tests on Windows & Mac
|
|
13
|
-
|
|
14
|
-
## [1.2.0] 2021-08-20
|
|
15
|
-
|
|
16
|
-
- Allow to call markdown-table-formatter with a glob parameter to find files to format
|
|
17
|
-
- Allow to call markdown-table-formatter without arguments (**/*.md will be used by default to collect files)
|
|
18
|
-
- Fix logs format
|
|
19
|
-
|
|
20
|
-
## [1.1.0] 2021-04-05
|
|
21
|
-
|
|
22
|
-
- Upgrade markdown-table-prettify to 3.4.0 so it can take in account inline disable comments
|
|
23
|
-
|
|
24
|
-
## [1.0.2] 2021-01-19
|
|
25
|
-
|
|
26
|
-
- Fix code coverage
|
|
27
|
-
|
|
28
|
-
## [1.0.1] 2021-01-14
|
|
29
|
-
|
|
30
|
-
- First working version :)
|
|
31
|
-
|
|
32
|
-
## [0.0.1] 2021-01-13
|
|
33
|
-
|
|
34
|
-
- Initial version
|