remark-mdat 0.7.0 → 0.7.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/.DS_Store +0 -0
- package/dist/index.d.ts +7 -7
- package/dist/index.js +32 -31
- package/dist/lib/mdast-utils/mdast-util-mdat-check.d.ts +1 -1
- package/dist/lib/mdast-utils/mdast-util-mdat-expand.d.ts +1 -1
- package/dist/lib/mdast-utils/mdast-util-mdat-split.d.ts +1 -1
- package/dist/lib/mdast-utils/mdast-util-mdat.d.ts +1 -1
- package/dist/lib/mdat/parse.d.ts +1 -1
- package/dist/lib/mdat/rules.d.ts +1 -1
- package/dist/lib/remark-mdat.d.ts +1 -1
- package/package.json +17 -16
- package/readme.md +8 -8
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type Html, type Text } from 'mdast';
|
|
2
1
|
import type { Root } from 'mdast';
|
|
2
|
+
import { type Html, type Text } from 'mdast';
|
|
3
3
|
import { type VFile } from 'vfile';
|
|
4
4
|
/**
|
|
5
5
|
* Mdast utility plugin to split any multi-comment nodes and their content into individual MDAST HTML
|
package/dist/lib/mdat/parse.d.ts
CHANGED
package/dist/lib/mdat/rules.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import type { Merge, MergeDeep, SetOptional, Simplify } from 'type-fest';
|
|
1
2
|
import { type Root } from 'mdast';
|
|
2
3
|
import { type JsonValue } from 'type-fest';
|
|
3
|
-
import type { Merge, MergeDeep, SetOptional, Simplify } from 'type-fest';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
export type SimplifyDeep<T> = Simplify<MergeDeep<T, T>>;
|
|
6
6
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { type Options as MdatOptions } from './mdast-utils/mdast-util-mdat';
|
|
2
1
|
import type { Root } from 'mdast';
|
|
3
2
|
import type { Plugin } from 'unified';
|
|
4
3
|
import { z } from 'zod';
|
|
4
|
+
import { type Options as MdatOptions } from './mdast-utils/mdast-util-mdat';
|
|
5
5
|
export type Options = Partial<MdatOptions>;
|
|
6
6
|
export declare const optionsSchema: z.ZodObject<{
|
|
7
7
|
addMetaComment: z.ZodOptional<z.ZodBoolean>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "remark-mdat",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A remark plugin implementing the Markdown Autophagic Template (MDAT) system.",
|
|
6
6
|
"repository": {
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
},
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"engines": {
|
|
22
|
-
"node": "
|
|
23
|
-
"pnpm": ">=
|
|
22
|
+
"node": "^18.19.0 || >=20.5.0",
|
|
23
|
+
"pnpm": ">=9.0.0"
|
|
24
24
|
},
|
|
25
25
|
"main": "./dist/index.js",
|
|
26
26
|
"module": "./dist/index.js",
|
|
@@ -42,27 +42,28 @@
|
|
|
42
42
|
],
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@types/mdast": "^4.0.4",
|
|
45
|
-
"@types/node": "
|
|
46
|
-
"@types/unist": "^3.0.
|
|
45
|
+
"@types/node": "18.19.0",
|
|
46
|
+
"@types/unist": "^3.0.3"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@kitschpatrol/shared-config": "^4.
|
|
50
|
-
"bumpp": "^9.
|
|
49
|
+
"@kitschpatrol/shared-config": "^4.7.5",
|
|
50
|
+
"bumpp": "^9.5.2",
|
|
51
51
|
"chalk": "^5.3.0",
|
|
52
52
|
"cli-table3": "^0.6.5",
|
|
53
|
-
"deepmerge-ts": "^7.0
|
|
54
|
-
"hast-util-from-html": "^2.0.
|
|
53
|
+
"deepmerge-ts": "^7.1.0",
|
|
54
|
+
"hast-util-from-html": "^2.0.2",
|
|
55
55
|
"json5": "^2.2.3",
|
|
56
56
|
"remark": "^15.0.1",
|
|
57
57
|
"remark-gfm": "^4.0.0",
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
58
|
+
"rimraf": "^6.0.1",
|
|
59
|
+
"tsup": "^8.2.4",
|
|
60
|
+
"type-fest": "^4.26.0",
|
|
61
|
+
"typescript": "^5.5.4",
|
|
62
|
+
"unified": "^11.0.5",
|
|
62
63
|
"unist-util-visit": "^5.0.0",
|
|
63
|
-
"vfile": "^6.0.
|
|
64
|
+
"vfile": "^6.0.3",
|
|
64
65
|
"vfile-message": "^4.0.2",
|
|
65
|
-
"vitest": "^
|
|
66
|
+
"vitest": "^2.0.5",
|
|
66
67
|
"zod": "^3.23.8"
|
|
67
68
|
},
|
|
68
69
|
"publishConfig": {
|
|
@@ -70,7 +71,7 @@
|
|
|
70
71
|
},
|
|
71
72
|
"scripts": {
|
|
72
73
|
"build": "tsup && tsc -p tsconfig.build.json",
|
|
73
|
-
"clean": "
|
|
74
|
+
"clean": "rimraf ./pnpm-lock.yaml && git clean -fdX",
|
|
74
75
|
"dev": "pnpm run test",
|
|
75
76
|
"fix": "pnpm shared-config --fix",
|
|
76
77
|
"lint": "pnpm shared-config --lint",
|
package/readme.md
CHANGED
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
- [Implementation notes](#implementation-notes)
|
|
38
38
|
- [The future](#the-future)
|
|
39
39
|
- [Maintainers](#maintainers)
|
|
40
|
-
- [
|
|
40
|
+
- [Acknowledgments](#acknowledgments)
|
|
41
41
|
- [Contributing](#contributing)
|
|
42
42
|
- [License](#license)
|
|
43
43
|
|
|
@@ -63,13 +63,13 @@ And replace it with dynamic data. In this case, from `package.json`:
|
|
|
63
63
|
<!-- /title -->
|
|
64
64
|
```
|
|
65
65
|
|
|
66
|
-
This plugin powers the higher-level [`mdat` package](https://github.com/kitschpatrol/mdat), which is a better
|
|
66
|
+
This plugin powers the higher-level [`mdat` package](https://github.com/kitschpatrol/mdat), which is a better place to start if you just want to expand some comments and aren't working directly with remark processing pipelines.
|
|
67
67
|
|
|
68
68
|
## Getting started
|
|
69
69
|
|
|
70
70
|
### Dependencies
|
|
71
71
|
|
|
72
|
-
This library is ESM only and requires Node 18
|
|
72
|
+
This library is ESM only and requires Node 18 (specifically `^18.19.0 || >=20.5.0`). It's designed to work with Remark 15. `remark-mdat` is implemented in TypeScript and bundles a complete set of type definitions.
|
|
73
73
|
|
|
74
74
|
### Installation
|
|
75
75
|
|
|
@@ -100,10 +100,10 @@ The plugin accepts an optional options object which exposes some configuration o
|
|
|
100
100
|
|
|
101
101
|
```ts
|
|
102
102
|
export type Options = {
|
|
103
|
-
addMetaComment?:
|
|
104
|
-
closingPrefix?:
|
|
105
|
-
keywordPrefix?:
|
|
106
|
-
metaCommentIdentifier?:
|
|
103
|
+
addMetaComment?: boolean // default: false
|
|
104
|
+
closingPrefix?: string // default: '/',
|
|
105
|
+
keywordPrefix?: string // default: '',
|
|
106
|
+
metaCommentIdentifier?: string // default: '+',
|
|
107
107
|
rules?: Rules // default: a single test rule for the 'mdat' keyword
|
|
108
108
|
}
|
|
109
109
|
```
|
|
@@ -213,7 +213,7 @@ This project was split from a monorepo containing both `mdat` and `remark-mdat`
|
|
|
213
213
|
|
|
214
214
|
[@kitschpatrol](https://github.com/kitschpatrol)
|
|
215
215
|
|
|
216
|
-
##
|
|
216
|
+
## Acknowledgments
|
|
217
217
|
|
|
218
218
|
Thanks to the [unified team](https://github.com/orgs/unifiedjs/people) for their superb ecosystem of AST tools.
|
|
219
219
|
|