remark-mdat 2.2.0 → 2.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/index.d.ts CHANGED
@@ -197,7 +197,7 @@ declare function mdatStrip(tree: Root, _file: VFile): void;
197
197
  * Export this for library consumers to inject their own logger.
198
198
  * @param logger - Accepts either a LogLayer instance or a Console- or Stream-like log target
199
199
  */
200
- declare function setLogger(logger?: ILogBasic | ILogLayer): void;
200
+ declare function setLogger(logger?: ILogBasic | ILogLayer<unknown>): void;
201
201
  //#endregion
202
202
  //#region src/lib/mdat/mdat-log.d.ts
203
203
  /** A simplified representation of a {@link VFileMessage}. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "remark-mdat",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "description": "A remark plugin implementing the Markdown Autophagic Template (MDAT) system.",
5
5
  "keywords": [
6
6
  "mdat",
@@ -46,11 +46,11 @@
46
46
  "gray-matter-es": "^0.2.1",
47
47
  "hast-util-from-html": "^2.0.3",
48
48
  "json5": "^2.2.3",
49
- "lognow": "^0.6.0",
49
+ "lognow": "^0.6.1",
50
50
  "picocolors": "^1.1.1",
51
51
  "remark": "^15.0.1",
52
52
  "remark-gfm": "^4.0.1",
53
- "type-fest": "^5.5.0",
53
+ "type-fest": "^5.6.0",
54
54
  "unified": "^11.0.5",
55
55
  "unist-util-visit": "^5.1.0",
56
56
  "vfile": "^6.0.3",
@@ -59,14 +59,15 @@
59
59
  },
60
60
  "devDependencies": {
61
61
  "@arethetypeswrong/core": "^0.18.2",
62
- "@kitschpatrol/shared-config": "^7.0.1",
63
- "@types/node": "~20.19.37",
64
- "@vitest/coverage-v8": "^4.1.2",
62
+ "@kitschpatrol/shared-config": "^7.4.1",
63
+ "@types/node": "~20.19.39",
64
+ "@vitest/coverage-v8": "^4.1.5",
65
65
  "bumpp": "^11.0.1",
66
66
  "publint": "^0.3.18",
67
- "tsdown": "^0.21.7",
67
+ "shx": "^0.4.0",
68
+ "tsdown": "^0.21.9",
68
69
  "typescript": "~5.9.3",
69
- "vitest": "^4.1.2"
70
+ "vitest": "^4.1.5"
70
71
  },
71
72
  "engines": {
72
73
  "node": ">=20.19.6"
@@ -81,13 +82,13 @@
81
82
  "bench": "vitest bench --run --no-file-parallelism --compare test/benchmarks/baseline.json",
82
83
  "bench:baseline": "vitest bench --run --no-file-parallelism --outputJson test/benchmarks/baseline.json",
83
84
  "build": "tsdown",
84
- "clean": "git rm -f pnpm-lock.yaml ; git clean -fdX",
85
+ "clean": "shx rm -f pnpm-lock.yaml && git clean -fdX -e !.claude/",
85
86
  "coverage": "vitest --coverage --run",
86
- "dev": "pnpm run test",
87
+ "dev": "pnpm test",
87
88
  "fix": "ksc fix",
88
89
  "lint": "ksc lint",
89
- "release": "bumpp --commit 'Release: %s' && pnpm run build && NPM_AUTH_TOKEN=$(op read 'op://Personal/npm/token') && pnpm publish",
90
- "release-preview": "bumpp --preid preview --commit 'Release: %s' && pnpm run build && NPM_AUTH_TOKEN=$(op read 'op://Personal/npm/token') && pnpm publish --tag preview",
90
+ "release": "bumpp --commit 'Release: %s' && pnpm build && NPM_AUTH_TOKEN=$(op read 'op://Personal/npm/token') && pnpm publish",
91
+ "release-preview": "bumpp --preid preview --commit 'Release: %s' && pnpm build && NPM_AUTH_TOKEN=$(op read 'op://Personal/npm/token') && pnpm publish --tag preview",
91
92
  "test": "vitest run"
92
93
  }
93
94
  }
package/readme.md CHANGED
@@ -4,14 +4,7 @@
4
4
 
5
5
  <!-- /title -->
6
6
 
7
- <!-- badges { custom: {
8
- "CI": {
9
- image: "https://github.com/kitschpatrol/remark-mdat/actions/workflows/ci.yml/badge.svg",
10
- link: "https://github.com/kitschpatrol/remark-mdat/actions/workflows/ci.yml",
11
- },
12
- }
13
- }
14
- -->
7
+ <!-- badges -->
15
8
 
16
9
  [![NPM Package remark-mdat](https://img.shields.io/npm/v/remark-mdat.svg)](https://npmjs.com/package/remark-mdat)
17
10
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
@@ -361,6 +354,8 @@ The former `mdast-util-mdat-clean` / `mdatClean` is now `mdast-util-mdat-collaps
361
354
 
362
355
  The `mdast-util-mdat-check` utility and its export `mdatCheck` have been removed. Validation logic (missing rules, empty content, rule errors) is now handled inline during expansion by `mdatExpand`, which reports issues as VFile messages. Use `reporterMdat` to format and display these messages.
363
356
 
357
+ For use cases where you need to check whether a file's expansions are up to date without modifying it (similar to `validate` in 1.x), use the new `mdatDiff` utility. It compares an original document against a freshly expanded version per-tag, identifying stale, unexpanded, or missing comments and reporting structured results.
358
+
364
359
  ### Rule function signature change
365
360
 
366
361
  In 1.x, rule content functions received the mdast tree directly as the second argument:
@@ -387,7 +382,7 @@ In 1.x, the argument parser was very permissive — parentheses were optional, b
387
382
 
388
383
  ```md
389
384
  <!-- greeting name: "Alice" -->
390
- <!-- greeting {name: "Alice"} -->
385
+ <!-- greeting ({name: "Alice"}) -->
391
386
  <!-- greeting({name: "Alice"}) -->
392
387
  ```
393
388
 
@@ -427,7 +422,7 @@ Remark is not a peer dependency on account of this discussion: [strip-markdown/i
427
422
 
428
423
  ## Maintainers
429
424
 
430
- [@kitschpatrol](https://github.com/kitschpatrol)
425
+ [kitschpatrol](https://github.com/kitschpatrol)
431
426
 
432
427
  ## Acknowledgments
433
428