mdat 3.1.0 → 3.2.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/dist/bin/cli.d.ts +1 -0
- package/dist/bin/cli.js +5 -1216
- package/dist/lib/index.d.ts +17 -17
- package/dist/lib/index.js +3 -1229
- package/dist/lib-BkjaGFsm.js +1298 -0
- package/package.json +25 -25
- package/readme.md +18 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mdat",
|
|
3
|
-
"version": "3.1
|
|
3
|
+
"version": "3.2.1",
|
|
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,51 @@
|
|
|
43
43
|
"dist/*"
|
|
44
44
|
],
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@clack/prompts": "^1.
|
|
47
|
-
"cosmiconfig": "^10.0.
|
|
46
|
+
"@clack/prompts": "^1.8.1",
|
|
47
|
+
"cosmiconfig": "^10.0.1",
|
|
48
48
|
"cosmiconfig-typescript-loader": "^6.3.0",
|
|
49
|
-
"deepmerge-ts": "^
|
|
50
|
-
"globby": "^16.2.
|
|
51
|
-
"lognow": "^0.8.
|
|
49
|
+
"deepmerge-ts": "^8.0.2",
|
|
50
|
+
"globby": "^16.2.4",
|
|
51
|
+
"lognow": "^0.8.2",
|
|
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.
|
|
58
|
-
"pretty-ms": "^9.3.
|
|
57
|
+
"pretty-bytes": "^7.1.3",
|
|
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.9.0",
|
|
64
64
|
"unified-engine": "^11.2.2",
|
|
65
65
|
"untildify": "^6.0.0",
|
|
66
66
|
"vfile": "^6.0.3",
|
|
67
67
|
"yargs": "^18.1.0",
|
|
68
|
-
"zod": "^4.
|
|
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.8.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
|
-
"bumpp": "^12.
|
|
77
|
+
"@vitest/coverage-v8": "^5.0.1",
|
|
78
|
+
"bumpp": "^12.3.0",
|
|
79
79
|
"execa": "^10.0.1",
|
|
80
|
-
"mdat-plugin-cli-help": "^3.
|
|
80
|
+
"mdat-plugin-cli-help": "^3.2.0",
|
|
81
81
|
"mdat-plugin-example": "^3.0.0",
|
|
82
82
|
"mdat-plugin-tldraw": "^3.0.0",
|
|
83
83
|
"nanoid": "^6.0.1",
|
|
84
84
|
"prettier": "^3.9.6",
|
|
85
|
-
"publint": "^0.3.
|
|
85
|
+
"publint": "^0.3.24",
|
|
86
86
|
"shx": "^0.4.0",
|
|
87
|
-
"tsdown": "^0.
|
|
87
|
+
"tsdown": "^0.23.0",
|
|
88
88
|
"typescript": "~6.0.3",
|
|
89
|
-
"unplugin-raw": "^0.
|
|
90
|
-
"vitest": "^
|
|
89
|
+
"unplugin-raw": "^0.8.0",
|
|
90
|
+
"vitest": "^5.0.1"
|
|
91
91
|
},
|
|
92
92
|
"peerDependencies": {
|
|
93
93
|
"prettier": "^3.0.0"
|
|
@@ -101,14 +101,14 @@
|
|
|
101
101
|
"node": ">=24.16.0"
|
|
102
102
|
},
|
|
103
103
|
"scripts": {
|
|
104
|
-
"bench": "vitest bench --run --
|
|
105
|
-
"bench:baseline": "vitest bench --run --
|
|
104
|
+
"bench": "vitest bench --run --reporter=default",
|
|
105
|
+
"bench:baseline": "vitest bench --run --reporter=default",
|
|
106
106
|
"build": "tsdown",
|
|
107
|
-
"clean": "shx rm -f pnpm-lock.yaml && git clean -fdX -e !.claude/",
|
|
107
|
+
"clean-deep": "shx rm -f pnpm-lock.yaml && git clean -fdX -e !.claude/",
|
|
108
108
|
"coverage": "vitest --coverage --run",
|
|
109
109
|
"fix": "ksc fix",
|
|
110
110
|
"lint": "ksc lint",
|
|
111
|
-
"release": "bumpp --commit 'Release: %s' && pnpm build &&
|
|
111
|
+
"release": "bumpp --commit 'Release: %s' && pnpm build && pnpm publish --otp $(op item get npm --otp)",
|
|
112
112
|
"test": "vitest run"
|
|
113
113
|
}
|
|
114
114
|
}
|
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
|
|
|
@@ -441,7 +449,7 @@ Removes expanded content, leaving only the opening comment placeholders. Same si
|
|
|
441
449
|
|
|
442
450
|
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
451
|
|
|
444
|
-
This is useful for producing a "clean" Markdown file that
|
|
452
|
+
This is useful for producing a "clean" Markdown file that doesn't need future content updates via MDAT.
|
|
445
453
|
|
|
446
454
|
#### `check` / `checkString`
|
|
447
455
|
|
|
@@ -604,13 +612,13 @@ See the [Examples section](https://github.com/kitschpatrol/remark-mdat#examples)
|
|
|
604
612
|
|
|
605
613
|
- ##### `<!-- size-table({ files: [".gitignore", "license.txt"] }) -->`
|
|
606
614
|
|
|
607
|
-
A table of files and their compressed sizes
|
|
615
|
+
A table of files and their compressed sizes. The optional `precision` sets the maximum number of decimal places and defaults to `0`:
|
|
608
616
|
|
|
609
617
|
<!-- size-table({ files: [".gitignore", "license.txt"] }) -->
|
|
610
618
|
|
|
611
619
|
| File | Original | Gzip | Brotli |
|
|
612
620
|
| ----------- | -------- | ----- | ------ |
|
|
613
|
-
| .gitignore |
|
|
621
|
+
| .gitignore | 327 B | 257 B | 237 B |
|
|
614
622
|
| license.txt | 1 kB | 659 B | 468 B |
|
|
615
623
|
|
|
616
624
|
<!-- /size-table -->
|
|
@@ -709,7 +717,7 @@ Example: `<!-- tldraw({ src: "./sketch.tldr" }) -->`
|
|
|
709
717
|
|
|
710
718
|
#### [mdat-plugin-cli-help](https://github.com/kitschpatrol/mdat-plugin-cli-help)
|
|
711
719
|
|
|
712
|
-
Transform a CLI command's `--help` output into Markdown tables. Recursively calls `--help` on subcommands. Currently parses [Yargs](https://yargs.js.org)
|
|
720
|
+
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
721
|
|
|
714
722
|
Example: `<!-- cli-help -->`
|
|
715
723
|
|
|
@@ -796,7 +804,7 @@ There's quite a bit of prior art and similar explorations of this problem space:
|
|
|
796
804
|
- lillallol's [md-in-place](https://www.npmjs.com/package/md-in-place)
|
|
797
805
|
|
|
798
806
|
- [AutoMD](https://automd.unjs.io/)\
|
|
799
|
-
Extremely similar functionality to mdat. The project was initiated around the same time as MDAT, but I didn't find the project until a few years later. Ships in the night.
|
|
807
|
+
Extremely similar functionality to mdat. The project was initiated around the same time as MDAT, but I didn't find the project until a few years later. Ships passing in the night.
|
|
800
808
|
|
|
801
809
|
- Franck Abgrall's [readme-md-generator](https://github.com/kefranabg/readme-md-generator)
|
|
802
810
|
|
|
@@ -806,12 +814,15 @@ There's quite a bit of prior art and similar explorations of this problem space:
|
|
|
806
814
|
|
|
807
815
|
- Hiroki Osame's [comment-mark](https://github.com/privatenumber/comment-mark)
|
|
808
816
|
|
|
809
|
-
- Hiroki Osame's [mdeval](https://github.com/privatenumber/mdeval)
|
|
817
|
+
- Hiroki Osame's [mdeval](https://github.com/privatenumber/mdeval)\
|
|
818
|
+
The best name!
|
|
810
819
|
|
|
811
820
|
### Implementation notes
|
|
812
821
|
|
|
813
822
|
This project was split from a monorepo containing both `mdat` and `remark-mdat` into separate repos in July 2024.
|
|
814
823
|
|
|
824
|
+
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.
|
|
825
|
+
|
|
815
826
|
## Maintainers
|
|
816
827
|
|
|
817
828
|
[kitschpatrol](https://github.com/kitschpatrol)
|