mdat 3.2.0 → 3.2.2
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/dist/bin/cli.d.ts +1 -0
- package/dist/bin/cli.js +6 -1221
- package/dist/lib/index.d.ts +17 -17
- package/dist/lib/index.js +3 -1232
- package/dist/lib-BEZJR3k_.js +1296 -0
- package/package.json +21 -20
- package/readme.md +20 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mdat",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.2",
|
|
4
4
|
"description": "CLI tool and TypeScript library implementing the Markdown Autophagic Template (MDAT) system. MDAT lets you use comments as dynamic content templates in Markdown files, making it easy to generate and update readme boilerplate.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mdat",
|
|
@@ -43,51 +43,52 @@
|
|
|
43
43
|
"dist/*"
|
|
44
44
|
],
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@clack/prompts": "^1.
|
|
46
|
+
"@clack/prompts": "^1.8.1",
|
|
47
47
|
"cosmiconfig": "^10.0.1",
|
|
48
48
|
"cosmiconfig-typescript-loader": "^6.3.0",
|
|
49
49
|
"deepmerge-ts": "^8.0.2",
|
|
50
50
|
"globby": "^16.2.4",
|
|
51
|
-
"lognow": "^0.8.
|
|
51
|
+
"lognow": "^0.8.4",
|
|
52
52
|
"mdast-util-toc": "^7.1.0",
|
|
53
|
-
"metascope": "^0.
|
|
53
|
+
"metascope": "^0.12.0",
|
|
54
54
|
"path-type": "^6.0.0",
|
|
55
55
|
"picocolors": "^1.1.1",
|
|
56
56
|
"plur": "^6.0.0",
|
|
57
|
-
"pretty-bytes": "^7.1.
|
|
57
|
+
"pretty-bytes": "^7.1.3",
|
|
58
58
|
"pretty-ms": "^9.3.1",
|
|
59
59
|
"remark": "^15.0.1",
|
|
60
60
|
"remark-gfm": "^4.0.1",
|
|
61
|
-
"remark-mdat": "^3.0.
|
|
61
|
+
"remark-mdat": "^3.0.2",
|
|
62
62
|
"to-vfile": "^8.0.0",
|
|
63
|
-
"type-fest": "^5.
|
|
63
|
+
"type-fest": "^5.10.0",
|
|
64
64
|
"unified-engine": "^11.2.2",
|
|
65
65
|
"untildify": "^6.0.0",
|
|
66
66
|
"vfile": "^6.0.3",
|
|
67
|
-
"yargs": "^18.
|
|
68
|
-
"zod": "^4.5
|
|
67
|
+
"yargs": "^18.2.0",
|
|
68
|
+
"zod": "^4.6.5"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@arethetypeswrong/core": "^0.18.5",
|
|
72
|
-
"@kitschpatrol/shared-config": "^8.
|
|
72
|
+
"@kitschpatrol/shared-config": "^8.10.0",
|
|
73
73
|
"@types/mdast": "^4.0.4",
|
|
74
|
-
"@types/node": "~24.13.
|
|
74
|
+
"@types/node": "~24.13.4",
|
|
75
75
|
"@types/unist": "^3.0.3",
|
|
76
76
|
"@types/yargs": "^17.0.35",
|
|
77
|
-
"@vitest/coverage-v8": "^
|
|
78
|
-
"
|
|
77
|
+
"@vitest/coverage-v8": "^5.0.1",
|
|
78
|
+
"brewpub": "^0.4.0",
|
|
79
|
+
"bumpp": "^12.3.0",
|
|
79
80
|
"execa": "^10.0.1",
|
|
80
81
|
"mdat-plugin-cli-help": "^3.2.0",
|
|
81
82
|
"mdat-plugin-example": "^3.0.0",
|
|
82
83
|
"mdat-plugin-tldraw": "^3.0.0",
|
|
83
84
|
"nanoid": "^6.0.1",
|
|
84
|
-
"prettier": "^3.9.
|
|
85
|
+
"prettier": "^3.9.8",
|
|
85
86
|
"publint": "^0.3.24",
|
|
86
87
|
"shx": "^0.4.0",
|
|
87
|
-
"tsdown": "^0.
|
|
88
|
+
"tsdown": "^0.23.0",
|
|
88
89
|
"typescript": "~6.0.3",
|
|
89
90
|
"unplugin-raw": "^0.8.0",
|
|
90
|
-
"vitest": "^
|
|
91
|
+
"vitest": "^5.0.1"
|
|
91
92
|
},
|
|
92
93
|
"peerDependencies": {
|
|
93
94
|
"prettier": "^3.0.0"
|
|
@@ -101,14 +102,14 @@
|
|
|
101
102
|
"node": ">=24.16.0"
|
|
102
103
|
},
|
|
103
104
|
"scripts": {
|
|
104
|
-
"bench": "vitest bench --run --
|
|
105
|
-
"bench:baseline": "vitest bench --run --
|
|
105
|
+
"bench": "vitest bench --run --reporter=default",
|
|
106
|
+
"bench:baseline": "vitest bench --run --reporter=default",
|
|
106
107
|
"build": "tsdown",
|
|
107
|
-
"clean": "shx rm -f pnpm-lock.yaml && git clean -fdX -e !.claude/",
|
|
108
|
+
"clean-deep": "shx rm -f pnpm-lock.yaml && git clean -fdX -e !.claude/",
|
|
108
109
|
"coverage": "vitest --coverage --run",
|
|
109
110
|
"fix": "ksc fix",
|
|
110
111
|
"lint": "ksc lint",
|
|
111
|
-
"release": "bumpp --commit 'Release: %s' && pnpm build && pnpm publish --otp $(op item get npm --otp)",
|
|
112
|
+
"release": "bumpp --commit 'Release: %s' && pnpm build && pnpm publish --otp $(op item get npm --otp) && brewpub --tap kitschpatrol/tap",
|
|
112
113
|
"test": "vitest run"
|
|
113
114
|
}
|
|
114
115
|
}
|
package/readme.md
CHANGED
|
@@ -4,11 +4,19 @@
|
|
|
4
4
|
|
|
5
5
|
<!-- /title -->
|
|
6
6
|
|
|
7
|
-
<!-- badges
|
|
7
|
+
<!-- badges({
|
|
8
|
+
custom: {
|
|
9
|
+
"Bundle Size": {
|
|
10
|
+
image: "https://img.shields.io/bundlephobia/minzip/mdat?label=Size",
|
|
11
|
+
link: "https://bundlephobia.com/package/mdat",
|
|
12
|
+
},
|
|
13
|
+
}
|
|
14
|
+
}) -->
|
|
8
15
|
|
|
9
16
|
[](https://www.npmjs.com/package/mdat)
|
|
10
17
|
[](https://opensource.org/license/mit)
|
|
11
18
|
[](https://github.com/kitschpatrol/mdat/actions/workflows/ci.yml)
|
|
19
|
+
[](https://bundlephobia.com/package/mdat)
|
|
12
20
|
|
|
13
21
|
<!-- /badges -->
|
|
14
22
|
|
|
@@ -119,6 +127,12 @@ Or install globally:
|
|
|
119
127
|
pnpm install --global mdat
|
|
120
128
|
```
|
|
121
129
|
|
|
130
|
+
The CLI tool is also available on Homebrew:
|
|
131
|
+
|
|
132
|
+
```sh
|
|
133
|
+
brew install kitschpatrol/tap/mdat
|
|
134
|
+
```
|
|
135
|
+
|
|
122
136
|
## Features
|
|
123
137
|
|
|
124
138
|
1. **Minimalist syntax**
|
|
@@ -441,7 +455,7 @@ Removes expanded content, leaving only the opening comment placeholders. Same si
|
|
|
441
455
|
|
|
442
456
|
Strips all MDAT comment tags (both opening and closing) while preserving expanded content between them. Same signatures as `expand` / `expandString` (without the `config` parameter, since rules are not needed).
|
|
443
457
|
|
|
444
|
-
This is useful for producing a "clean" Markdown file that
|
|
458
|
+
This is useful for producing a "clean" Markdown file that doesn't need future content updates via MDAT.
|
|
445
459
|
|
|
446
460
|
#### `check` / `checkString`
|
|
447
461
|
|
|
@@ -610,7 +624,7 @@ See the [Examples section](https://github.com/kitschpatrol/remark-mdat#examples)
|
|
|
610
624
|
|
|
611
625
|
| File | Original | Gzip | Brotli |
|
|
612
626
|
| ----------- | -------- | ----- | ------ |
|
|
613
|
-
| .gitignore |
|
|
627
|
+
| .gitignore | 327 B | 257 B | 237 B |
|
|
614
628
|
| license.txt | 1 kB | 659 B | 468 B |
|
|
615
629
|
|
|
616
630
|
<!-- /size-table -->
|
|
@@ -709,7 +723,7 @@ Example: `<!-- tldraw({ src: "./sketch.tldr" }) -->`
|
|
|
709
723
|
|
|
710
724
|
#### [mdat-plugin-cli-help](https://github.com/kitschpatrol/mdat-plugin-cli-help)
|
|
711
725
|
|
|
712
|
-
Transform a CLI command's `--help` output into Markdown tables. Recursively calls `--help` on subcommands. Currently parses [Yargs](https://yargs.js.org)
|
|
726
|
+
Transform a CLI command's `--help` output into Markdown tables. Recursively calls `--help` on subcommands. Currently parses [Yargs](https://yargs.js.org), [Meow](https://github.com/sindresorhus/meow), and [Commander](https://github.com/tj/commander.js) help output formats, falling back to a plain text code block as necessary.
|
|
713
727
|
|
|
714
728
|
Example: `<!-- cli-help -->`
|
|
715
729
|
|
|
@@ -813,6 +827,8 @@ There's quite a bit of prior art and similar explorations of this problem space:
|
|
|
813
827
|
|
|
814
828
|
This project was split from a monorepo containing both `mdat` and `remark-mdat` into separate repos in July 2024.
|
|
815
829
|
|
|
830
|
+
Run `pnpm bench` to compare performance against `test/benchmarks/baseline.json`. Run `pnpm bench:baseline` to refresh the saved results using Vitest 5's benchmark format. Both commands support filters such as `-t loadConfig`; refreshing a filtered subset preserves the other baselines. Use the same machine and Node.js version for meaningful comparisons.
|
|
831
|
+
|
|
816
832
|
## Maintainers
|
|
817
833
|
|
|
818
834
|
[kitschpatrol](https://github.com/kitschpatrol)
|