remark-mdat 2.0.0-preview.4 → 2.0.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/dist/index.js +5 -5
- package/package.json +2 -2
- package/readme.md +13 -3
package/dist/index.js
CHANGED
|
@@ -86,13 +86,13 @@ function getMdatReport(file) {
|
|
|
86
86
|
function reporterMdat(files) {
|
|
87
87
|
for (const file of files) {
|
|
88
88
|
const { destinationPath, errors, infos, sourcePath, warnings } = getMdatReport(file);
|
|
89
|
-
log.
|
|
90
|
-
log.
|
|
91
|
-
if (destinationPath !== void 0) log.
|
|
89
|
+
log.debug(picocolors.bold("MDAT Report:"));
|
|
90
|
+
log.debug(`\tFrom: ${picocolors.blue(picocolors.bold(sourcePath))}`);
|
|
91
|
+
if (destinationPath !== void 0) log.debug(`\tTo: ${picocolors.blue(picocolors.bold(destinationPath))}`);
|
|
92
92
|
for (const message of errors) log.error(mdatMessageToLogString(sourcePath, message));
|
|
93
93
|
for (const message of warnings) log.warn(mdatMessageToLogString(sourcePath, message));
|
|
94
|
-
for (const message of infos) log.
|
|
95
|
-
if (errors.length === 0 && warnings.length === 0) log.
|
|
94
|
+
for (const message of infos) log.debug(mdatMessageToLogString(sourcePath, message));
|
|
95
|
+
if (errors.length === 0 && warnings.length === 0) log.debug(`No issues found in ${sourcePath}`);
|
|
96
96
|
else log.error(`${errors.length} errors, ${warnings.length} warnings found in ${sourcePath}`);
|
|
97
97
|
}
|
|
98
98
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "remark-mdat",
|
|
3
|
-
"version": "2.0.0
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "A remark plugin implementing the Markdown Autophagic Template (MDAT) system.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mdat",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@arethetypeswrong/core": "^0.18.2",
|
|
62
|
-
"@kitschpatrol/shared-config": "^6.
|
|
62
|
+
"@kitschpatrol/shared-config": "^6.2.0",
|
|
63
63
|
"@types/node": "~20.19.37",
|
|
64
64
|
"bumpp": "^11.0.1",
|
|
65
65
|
"publint": "^0.3.18",
|
package/readme.md
CHANGED
|
@@ -41,7 +41,17 @@
|
|
|
41
41
|
- [API](#api)
|
|
42
42
|
- [Examples](#examples)
|
|
43
43
|
- [Utilities](#utilities)
|
|
44
|
-
- [Migrating from
|
|
44
|
+
- [Migrating from 1.x to 2.x](#migrating-from-1x-to-2x)
|
|
45
|
+
- [Simplified options](#simplified-options)
|
|
46
|
+
- [Removed options](#removed-options)
|
|
47
|
+
- [Removed rule properties](#removed-rule-properties)
|
|
48
|
+
- [Changed rule properties](#changed-rule-properties)
|
|
49
|
+
- [Removed validation utility](#removed-validation-utility)
|
|
50
|
+
- [Rule function signature change](#rule-function-signature-change)
|
|
51
|
+
- [Stricter argument syntax](#stricter-argument-syntax)
|
|
52
|
+
- [Comment-style comments are ignored](#comment-style-comments-are-ignored)
|
|
53
|
+
- [Compound rule error handling](#compound-rule-error-handling)
|
|
54
|
+
- [Removed export: `deepMergeDefined`](#removed-export-deepmergedefined)
|
|
45
55
|
- [Implementation notes](#implementation-notes)
|
|
46
56
|
- [Maintainers](#maintainers)
|
|
47
57
|
- [Acknowledgments](#acknowledgments)
|
|
@@ -275,7 +285,7 @@ Errors and warnings are reported inline during expansion via [VFile messages](ht
|
|
|
275
285
|
|
|
276
286
|
_Exported as `mdatExpand(tree: Root, file: VFile, rules: Rules): Promise<void>`_
|
|
277
287
|
|
|
278
|
-
## Migrating from
|
|
288
|
+
## Migrating from 1.x to 2.x
|
|
279
289
|
|
|
280
290
|
Version 2.0 simplifies and solidifies the API by removing several configuration options and validation features that added complexity without sufficient benefit. The core expansion behavior is unchanged — the plugin still matches HTML comments to rules and expands them — but the way you configure it has changed.
|
|
281
291
|
|
|
@@ -321,7 +331,7 @@ The following plugin options have been removed entirely:
|
|
|
321
331
|
| Removed property | Migration |
|
|
322
332
|
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
323
333
|
| `required` | Remove. All rules are treated equally. Missing comments produce a warning instead of an error. |
|
|
324
|
-
| `order
|
|
334
|
+
| `order` | Remove. The 1.x `order` property enforced comment _position_ in the document. In 2.x, `order` controls _processing priority_ only (default: `0`). |
|
|
325
335
|
|
|
326
336
|
### Changed rule properties
|
|
327
337
|
|