Skip to content

Commit df2b873

Browse files
committed
Refactor docs
1 parent 11c1c39 commit df2b873

File tree

1 file changed

+23
-12
lines changed

1 file changed

+23
-12
lines changed

readme.md

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ internals away.
6060
## Install
6161

6262
This package is [ESM only][esm].
63-
In Node.js (version 14.14+ and 16.0+), install with [npm][]:
63+
In Node.js (version 16+), install with [npm][]:
6464

6565
```sh
6666
npm install mdast-util-mdxjs-esm
@@ -209,11 +209,15 @@ MDX ESM (import/export) node (TypeScript type).
209209

210210
```ts
211211
import type {Program} from 'estree-jsx'
212-
import type {Literal} from 'mdast'
212+
import type {Data, Literal} from 'mdast'
213213

214214
interface MdxjsEsm extends Literal {
215215
type: 'mdxjsEsm'
216-
data?: {estree?: Program | null | undefined}
216+
data?: MdxjsEsmData | undefined
217+
}
218+
219+
export interface MdxjsEsmData extends Data {
220+
estree?: Program | null | undefined
217221
}
218222
```
219223

@@ -226,11 +230,15 @@ Same as [`MdxjsEsm`][api-mdxjs-esm], but registered with `@types/hast`
226230

227231
```ts
228232
import type {Program} from 'estree-jsx'
229-
import type {Literal} from 'hast'
233+
import type {Data, Literal} from 'hast'
230234

231-
interface MdxjsEsm extends Literal {
235+
interface MdxjsEsmHast extends Literal {
232236
type: 'mdxjsEsm'
233-
data?: {estree?: Program | null | undefined}
237+
data?: MdxjsEsmHastData | undefined
238+
}
239+
240+
export interface MdxjsEsmHastData extends Data {
241+
estree?: Program | null | undefined
234242
}
235243
```
236244

@@ -317,12 +325,15 @@ visit(tree, function (node) {
317325

318326
## Compatibility
319327

320-
Projects maintained by the unified collective are compatible with all maintained
328+
Projects maintained by the unified collective are compatible with maintained
321329
versions of Node.js.
322-
As of now, that is Node.js 14.14+ and 16.0+.
323-
Our projects sometimes work with older versions, but this is not guaranteed.
324330

325-
This plugin works with `mdast-util-from-markdown` version 1+ and
331+
When we cut a new major release, we drop support for unmaintained versions of
332+
Node.
333+
This means we try to keep the current release line, `mdast-util-mdxjs-esm@^1`,
334+
compatible with Node.js 12.
335+
336+
This utility works with `mdast-util-from-markdown` version 1+ and
326337
`mdast-util-to-markdown` version 1+.
327338

328339
## Related
@@ -362,9 +373,9 @@ abide by its terms.
362373

363374
[downloads]: https://www.npmjs.com/package/mdast-util-mdxjs-esm
364375

365-
[size-badge]: https://img.shields.io/bundlephobia/minzip/mdast-util-mdxjs-esm.svg
376+
[size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=mdast-util-mdxjs-esm
366377

367-
[size]: https://bundlephobia.com/result?p=mdast-util-mdxjs-esm
378+
[size]: https://bundlejs.com/?q=mdast-util-mdxjs-esm
368379

369380
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
370381

0 commit comments

Comments
 (0)