Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 763af0b

Browse files
committed
Update dev-dependencies
1 parent 2e27c06 commit 763af0b

File tree

3 files changed

+141
-127
lines changed

3 files changed

+141
-127
lines changed

‎dev/lib/index.js‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,9 @@ export function fromMarkdown(value, encoding, options) {
176176

177177
return compiler(options)(
178178
postprocess(
179-
parse(options).document().write(preprocess()(value, encoding, true))
179+
parse(options)
180+
.document()
181+
.write(preprocess()(value, encoding, true))
180182
)
181183
)
182184
}

‎package.json‎

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,24 +56,25 @@
5656
"@types/node": "^20.0.0",
5757
"c8": "^8.0.0",
5858
"commonmark.json": "^0.30.0",
59-
"esbuild": "^0.18.0",
59+
"esbuild": "^0.19.0",
6060
"gzip-size-cli": "^5.0.0",
61-
"hast-util-from-html": "^1.0.0",
62-
"hast-util-to-html": "^8.0.0",
63-
"mdast-util-to-hast": "^12.0.0",
61+
"hast-util-from-html": "^2.0.0",
62+
"hast-util-to-html": "^9.0.0",
63+
"mdast-util-to-hast": "^13.0.0",
6464
"micromark-build": "^2.0.0",
65-
"prettier": "^2.0.0",
66-
"remark-cli": "^11.0.0",
65+
"prettier": "^3.0.0",
66+
"remark-cli": "^12.0.0",
67+
"remark-gfm": "^4.0.0",
6768
"remark-preset-wooorm": "^9.0.0",
6869
"terser": "^5.0.0",
6970
"type-coverage": "^2.0.0",
7071
"typescript": "^5.0.0",
71-
"xo": "^0.54.0"
72+
"xo": "^0.56.0"
7273
},
7374
"scripts": {
7475
"prepack": "npm run build && npm run format",
7576
"build": "tsc --build --clean && tsc --build && type-coverage && micromark-build && esbuild . --bundle --minify | terser | gzip-size --raw",
76-
"format": "remark . -qfo && prettier . -w --loglevel warn && xo --fix",
77+
"format": "remark . -qfo && prettier . -w --log-level warn && xo --fix",
7778
"test-api-dev": "node --conditions development test/index.js",
7879
"test-api-prod": "node --conditions production test/index.js",
7980
"test-api": "npm run test-api-dev && npm run test-api-prod",
@@ -90,7 +91,16 @@
9091
},
9192
"remarkConfig": {
9293
"plugins": [
93-
"remark-preset-wooorm"
94+
"remark-preset-wooorm",
95+
[
96+
"remark-preset-wooorm/node_modules/remark-gfm/index.js",
97+
false
98+
],
99+
[
100+
"remark-lint-list-item-indent",
101+
"space"
102+
],
103+
"remark-gfm"
94104
]
95105
},
96106
"typeCoverage": {
@@ -117,7 +127,9 @@
117127
"prettier": true,
118128
"rules": {
119129
"complexity": "off",
120-
"max-depth": "off"
130+
"max-depth": "off",
131+
"unicorn/prefer-at": "off",
132+
"unicorn/prefer-string-replace-all": "off"
121133
}
122134
}
123135
}

‎readme.md‎

Lines changed: 116 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -12,32 +12,32 @@
1212

1313
## Contents
1414

15-
* [What is this?](#what-is-this)
16-
* [When should I use this?](#when-should-i-use-this)
17-
* [Install](#install)
18-
* [Use](#use)
19-
* [API](#api)
20-
* [`fromMarkdown(value[, encoding][, options])`](#frommarkdownvalue-encoding-options)
21-
* [`CompileContext`](#compilecontext)
22-
* [`CompileData`](#compiledata)
23-
* [`Encoding`](#encoding)
24-
* [`Extension`](#extension)
25-
* [`Handle`](#handle)
26-
* [`OnEnterError`](#onentererror)
27-
* [`OnExitError`](#onexiterror)
28-
* [`Options`](#options)
29-
* [`Token`](#token)
30-
* [`Transform`](#transform)
31-
* [`Value`](#value)
32-
* [List of extensions](#list-of-extensions)
33-
* [Syntax](#syntax)
34-
* [Syntax tree](#syntax-tree)
35-
* [Types](#types)
36-
* [Compatibility](#compatibility)
37-
* [Security](#security)
38-
* [Related](#related)
39-
* [Contribute](#contribute)
40-
* [License](#license)
15+
* [What is this?](#what-is-this)
16+
* [When should I use this?](#when-should-i-use-this)
17+
* [Install](#install)
18+
* [Use](#use)
19+
* [API](#api)
20+
* [`fromMarkdown(value[, encoding][, options])`](#frommarkdownvalue-encoding-options)
21+
* [`CompileContext`](#compilecontext)
22+
* [`CompileData`](#compiledata)
23+
* [`Encoding`](#encoding)
24+
* [`Extension`](#extension)
25+
* [`Handle`](#handle)
26+
* [`OnEnterError`](#onentererror)
27+
* [`OnExitError`](#onexiterror)
28+
* [`Options`](#options)
29+
* [`Token`](#token)
30+
* [`Transform`](#transform)
31+
* [`Value`](#value)
32+
* [List of extensions](#list-of-extensions)
33+
* [Syntax](#syntax)
34+
* [Syntax tree](#syntax-tree)
35+
* [Types](#types)
36+
* [Compatibility](#compatibility)
37+
* [Security](#security)
38+
* [Related](#related)
39+
* [Contribute](#contribute)
40+
* [License](#license)
4141

4242
## What is this?
4343

@@ -142,18 +142,18 @@ Turn markdown into a syntax tree.
142142

143143
###### Overloads
144144

145-
* `(value: Value, encoding: Encoding, options?: Options) => Root`
146-
* `(value: Value, options?: Options) => Root`
145+
* `(value: Value, encoding: Encoding, options?: Options) => Root`
146+
* `(value: Value, options?: Options) => Root`
147147

148148
###### Parameters
149149

150-
* `value` ([`Value`][api-value])
151-
— markdown to parse
152-
* `encoding` ([`Encoding`][api-encoding], default: `'utf8'`)
153-
[character encoding][encoding] for when `value` is
154-
[`Uint8Array`][uint8-array]
155-
* `options` ([`Options`][api-options], optional)
156-
— configuration
150+
* `value` ([`Value`][api-value])
151+
— markdown to parse
152+
* `encoding` ([`Encoding`][api-encoding], default: `'utf8'`)
153+
[character encoding][encoding] for when `value` is
154+
[`Uint8Array`][uint8-array]
155+
* `options` ([`Options`][api-options], optional)
156+
— configuration
157157

158158
###### Returns
159159

@@ -165,24 +165,24 @@ mdast compiler context (TypeScript type).
165165

166166
###### Fields
167167

168-
* `stack` ([`Array<Node>`][node])
169-
— stack of nodes
170-
* `tokenStack` (`Array<[Token, OnEnterError | undefined]>`)
171-
— stack of tokens
172-
* `data` ([`CompileData`][api-compile-data])
173-
— info passed around; key/value store
174-
* `buffer` (`() => undefined`)
175-
— capture some of the output data
176-
* `resume` (`() => string`)
177-
— stop capturing and access the output data
178-
* `enter` (`(node: Node, token: Token, onError?: OnEnterError) => undefined`)
179-
— enter a node
180-
* `exit` (`(token: Token, onError?: OnExitError) => undefined`)
181-
— exit a node
182-
* `sliceSerialize` (`(token: Token, expandTabs?: boolean) => string`)
183-
— get the string value of a token
184-
* `config` (`Required<Extension>`)
185-
— configuration
168+
* `stack` ([`Array<Node>`][node])
169+
— stack of nodes
170+
* `tokenStack` (`Array<[Token, OnEnterError | undefined]>`)
171+
— stack of tokens
172+
* `data` ([`CompileData`][api-compile-data])
173+
— info passed around; key/value store
174+
* `buffer` (`() => undefined`)
175+
— capture some of the output data
176+
* `resume` (`() => string`)
177+
— stop capturing and access the output data
178+
* `enter` (`(node: Node, token: Token, onError?: OnEnterError) => undefined`)
179+
— enter a node
180+
* `exit` (`(token: Token, onError?: OnExitError) => undefined`)
181+
— exit a node
182+
* `sliceSerialize` (`(token: Token, expandTabs?: boolean) => string`)
183+
— get the string value of a token
184+
* `config` (`Required<Extension>`)
185+
— configuration
186186

187187
### `CompileData`
188188

@@ -225,25 +225,25 @@ type).
225225
226226
###### Properties
227227
228-
* `canContainEols` (`Array<string>`, optional)
229-
— token types where line endings are used
230-
* `enter` ([`Record<string, Handle>`][api-handle], optional)
231-
— opening handles
232-
* `exit` ([`Record<string, Handle>`][api-handle], optional)
233-
— closing handles
234-
* `transforms` ([`Array<Transform>`][api-transform], optional)
235-
— tree transforms
228+
* `canContainEols` (`Array<string>`, optional)
229+
— token types where line endings are used
230+
* `enter` ([`Record<string, Handle>`][api-handle], optional)
231+
— opening handles
232+
* `exit` ([`Record<string, Handle>`][api-handle], optional)
233+
— closing handles
234+
* `transforms` ([`Array<Transform>`][api-transform], optional)
235+
— tree transforms
236236
237237
### `Handle`
238238
239239
Handle a token (TypeScript type).
240240
241241
###### Parameters
242242
243-
* `this` ([`CompileContext`][api-compile-context])
244-
— context
245-
* `token` ([`Token`][api-token])
246-
— current token
243+
* `this` ([`CompileContext`][api-compile-context])
244+
— context
245+
* `token` ([`Token`][api-token])
246+
— current token
247247
248248
###### Returns
249249
@@ -256,12 +256,12 @@ Handle the case where the `right` token is open, but it is closed (by the
256256
257257
###### Parameters
258258
259-
* `this` ([`CompileContext`][api-compile-context])
260-
— context
261-
* `left` ([`Token`][api-token] or `undefined`)
262-
— left token
263-
* `right` ([`Token`][api-token])
264-
— right token
259+
* `this` ([`CompileContext`][api-compile-context])
260+
— context
261+
* `left` ([`Token`][api-token] or `undefined`)
262+
— left token
263+
* `right` ([`Token`][api-token])
264+
— right token
265265
266266
###### Returns
267267
@@ -274,12 +274,12 @@ exiting the `left` token (TypeScript type).
274274
275275
###### Parameters
276276
277-
* `this` ([`CompileContext`][api-compile-context])
278-
— context
279-
* `left` ([`Token`][api-token])
280-
— left token
281-
* `right` ([`Token`][api-token])
282-
— right token
277+
* `this` ([`CompileContext`][api-compile-context])
278+
— context
279+
* `left` ([`Token`][api-token])
280+
— left token
281+
* `right` ([`Token`][api-token])
282+
— right token
283283
284284
###### Returns
285285
@@ -291,11 +291,11 @@ Configuration (TypeScript type).
291291
292292
###### Properties
293293
294-
* `extensions` ([`Array<MicromarkExtension>`][micromark-extension], optional)
295-
— micromark extensions to change how markdown is parsed
296-
* `mdastExtensions` ([`Array<Extension | Array<Extension>>`][api-extension],
297-
optional)
298-
— extensions for this utility to change how tokens are turned into a tree
294+
* `extensions` ([`Array<MicromarkExtension>`][micromark-extension], optional)
295+
— micromark extensions to change how markdown is parsed
296+
* `mdastExtensions` ([`Array<Extension | Array<Extension>>`][api-extension],
297+
optional)
298+
— extensions for this utility to change how tokens are turned into a tree
299299
300300
### `Token`
301301
@@ -313,8 +313,8 @@ Extra transform, to change the AST afterwards (TypeScript type).
313313
314314
###### Parameters
315315
316-
* `tree` ([`Root`][root])
317-
— tree to transform
316+
* `tree` ([`Root`][root])
317+
— tree to transform
318318
319319
###### Returns
320320
@@ -334,32 +334,32 @@ type Value = Uint8Array | string
334334
335335
## List of extensions
336336
337-
* [`syntax-tree/mdast-util-directive`](https://github.com/syntax-tree/mdast-util-directive)
338-
— directives
339-
* [`syntax-tree/mdast-util-frontmatter`](https://github.com/syntax-tree/mdast-util-frontmatter)
340-
— frontmatter (YAML, TOML, more)
341-
* [`syntax-tree/mdast-util-gfm`](https://github.com/syntax-tree/mdast-util-gfm)
342-
— GFM
343-
* [`syntax-tree/mdast-util-gfm-autolink-literal`](https://github.com/syntax-tree/mdast-util-gfm-autolink-literal)
344-
— GFM autolink literals
345-
* [`syntax-tree/mdast-util-gfm-footnote`](https://github.com/syntax-tree/mdast-util-gfm-footnote)
346-
— GFM footnotes
347-
* [`syntax-tree/mdast-util-gfm-strikethrough`](https://github.com/syntax-tree/mdast-util-gfm-strikethrough)
348-
— GFM strikethrough
349-
* [`syntax-tree/mdast-util-gfm-table`](https://github.com/syntax-tree/mdast-util-gfm-table)
350-
— GFM tables
351-
* [`syntax-tree/mdast-util-gfm-task-list-item`](https://github.com/syntax-tree/mdast-util-gfm-task-list-item)
352-
— GFM task list items
353-
* [`syntax-tree/mdast-util-math`](https://github.com/syntax-tree/mdast-util-math)
354-
— math
355-
* [`syntax-tree/mdast-util-mdx`](https://github.com/syntax-tree/mdast-util-mdx)
356-
— MDX
357-
* [`syntax-tree/mdast-util-mdx-expression`](https://github.com/syntax-tree/mdast-util-mdx-expression)
358-
— MDX expressions
359-
* [`syntax-tree/mdast-util-mdx-jsx`](https://github.com/syntax-tree/mdast-util-mdx-jsx)
360-
— MDX JSX
361-
* [`syntax-tree/mdast-util-mdxjs-esm`](https://github.com/syntax-tree/mdast-util-mdxjs-esm)
362-
— MDX ESM
337+
* [`syntax-tree/mdast-util-directive`](https://github.com/syntax-tree/mdast-util-directive)
338+
— directives
339+
* [`syntax-tree/mdast-util-frontmatter`](https://github.com/syntax-tree/mdast-util-frontmatter)
340+
— frontmatter (YAML, TOML, more)
341+
* [`syntax-tree/mdast-util-gfm`](https://github.com/syntax-tree/mdast-util-gfm)
342+
— GFM
343+
* [`syntax-tree/mdast-util-gfm-autolink-literal`](https://github.com/syntax-tree/mdast-util-gfm-autolink-literal)
344+
— GFM autolink literals
345+
* [`syntax-tree/mdast-util-gfm-footnote`](https://github.com/syntax-tree/mdast-util-gfm-footnote)
346+
— GFM footnotes
347+
* [`syntax-tree/mdast-util-gfm-strikethrough`](https://github.com/syntax-tree/mdast-util-gfm-strikethrough)
348+
— GFM strikethrough
349+
* [`syntax-tree/mdast-util-gfm-table`](https://github.com/syntax-tree/mdast-util-gfm-table)
350+
— GFM tables
351+
* [`syntax-tree/mdast-util-gfm-task-list-item`](https://github.com/syntax-tree/mdast-util-gfm-task-list-item)
352+
— GFM task list items
353+
* [`syntax-tree/mdast-util-math`](https://github.com/syntax-tree/mdast-util-math)
354+
— math
355+
* [`syntax-tree/mdast-util-mdx`](https://github.com/syntax-tree/mdast-util-mdx)
356+
— MDX
357+
* [`syntax-tree/mdast-util-mdx-expression`](https://github.com/syntax-tree/mdast-util-mdx-expression)
358+
— MDX expressions
359+
* [`syntax-tree/mdast-util-mdx-jsx`](https://github.com/syntax-tree/mdast-util-mdx-jsx)
360+
— MDX JSX
361+
* [`syntax-tree/mdast-util-mdxjs-esm`](https://github.com/syntax-tree/mdast-util-mdxjs-esm)
362+
— MDX ESM
363363
364364
## Syntax
365365
@@ -407,12 +407,12 @@ When going to HTML, use this utility in combination with
407407
408408
## Related
409409
410-
* [`syntax-tree/mdast-util-to-markdown`](https://github.com/syntax-tree/mdast-util-to-markdown)
411-
— serialize mdast as markdown
412-
* [`micromark/micromark`](https://github.com/micromark/micromark)
413-
— parse markdown
414-
* [`remarkjs/remark`](https://github.com/remarkjs/remark)
415-
— process markdown
410+
* [`syntax-tree/mdast-util-to-markdown`](https://github.com/syntax-tree/mdast-util-to-markdown)
411+
— serialize mdast as markdown
412+
* [`micromark/micromark`](https://github.com/micromark/micromark)
413+
— parse markdown
414+
* [`remarkjs/remark`](https://github.com/remarkjs/remark)
415+
— process markdown
416416
417417
## Contribute
418418

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /