@@ -71,7 +71,7 @@ internals away.
71
71
## Install
72
72
73
73
This package is [ ESM only] [ esm ] .
74
- In Node.js (version 14.14+ and 16.0 +), install with [ npm] [ ] :
74
+ In Node.js (version 16 +), install with [ npm] [ ] :
75
75
76
76
``` sh
77
77
npm install mdast-util-mdx-jsx
@@ -110,10 +110,10 @@ Say our document `example.mdx` contains:
110
110
``` js
111
111
import fs from ' node:fs/promises'
112
112
import * as acorn from ' acorn'
113
- import {fromMarkdown } from ' mdast-util-from-markdown'
114
- import {toMarkdown } from ' mdast-util-to-markdown'
115
113
import {mdxJsx } from ' micromark-extension-mdx-jsx'
114
+ import {fromMarkdown } from ' mdast-util-from-markdown'
116
115
import {mdxJsxFromMarkdown , mdxJsxToMarkdown } from ' mdast-util-mdx-jsx'
116
+ import {toMarkdown } from ' mdast-util-to-markdown'
117
117
118
118
const doc = await fs .readFile (' example.mdx' )
119
119
@@ -424,7 +424,7 @@ The following interfaces are added to **[mdast][]** by this utility.
424
424
425
425
``` idl
426
426
interface MdxJsxFlowElement <: Parent {
427
- type: " mdxJsxFlowElement"
427
+ type: ' mdxJsxFlowElement'
428
428
}
429
429
430
430
MdxJsxFlowElement includes MdxJsxElement
@@ -457,7 +457,7 @@ Yields:
457
457
458
458
``` idl
459
459
interface MdxJsxTextElement <: Parent {
460
- type: " mdxJsxTextElement"
460
+ type: ' mdxJsxTextElement'
461
461
}
462
462
463
463
MdxJsxTextElement includes MdxJsxElement
@@ -497,17 +497,17 @@ interface mixin MdxJsxElement {
497
497
}
498
498
499
499
interface MdxJsxExpressionAttribute <: Literal {
500
- type: " mdxJsxExpressionAttribute"
500
+ type: ' mdxJsxExpressionAttribute'
501
501
}
502
502
503
503
interface MdxJsxAttribute <: Node {
504
- type: " mdxJsxAttribute"
504
+ type: ' mdxJsxAttribute'
505
505
name: string
506
506
value: MdxJsxAttributeValueExpression | string?
507
507
}
508
508
509
509
interface MdxJsxAttributeValueExpression <: Literal {
510
- type: " mdxJsxAttributeValueExpression"
510
+ type: ' mdxJsxAttributeValueExpression'
511
511
}
512
512
```
513
513
@@ -577,12 +577,15 @@ visit(tree, function (node) {
577
577
578
578
## Compatibility
579
579
580
- Projects maintained by the unified collective are compatible with all maintained
580
+ Projects maintained by the unified collective are compatible with maintained
581
581
versions of Node.js.
582
- As of now, that is Node.js 14.14+ and 16.0+.
583
- Our projects sometimes work with older versions, but this is not guaranteed.
584
582
585
- This plugin works with ` mdast-util-from-markdown ` version 1+ and
583
+ When we cut a new major release, we drop support for unmaintained versions of
584
+ Node.
585
+ This means we try to keep the current release line, ` mdast-util-mdx-jsx@^2 ` ,
586
+ compatible with Node.js 12.
587
+
588
+ This utility works with ` mdast-util-from-markdown ` version 1+ and
586
589
` mdast-util-to-markdown ` version 1+.
587
590
588
591
## Related
@@ -620,9 +623,9 @@ abide by its terms.
620
623
621
624
[ downloads ] : https://www.npmjs.com/package/mdast-util-mdx-jsx
622
625
623
- [ size-badge ] : https://img.shields.io/bundlephobia/minzip/ mdast-util-mdx-jsx.svg
626
+ [ size-badge ] : https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q= mdast-util-mdx-jsx
624
627
625
- [ size ] : https://bundlephobia .com/result?p =mdast-util-mdx-jsx
628
+ [ size ] : https://bundlejs .com/?q =mdast-util-mdx-jsx
626
629
627
630
[ sponsors-badge ] : https://opencollective.com/unified/sponsors/badge.svg
628
631
0 commit comments