Skip to content

Commit a89a829

Browse files
committed
Update dev-dependencies
1 parent 3cff4a6 commit a89a829

File tree

2 files changed

+55
-64
lines changed

2 files changed

+55
-64
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@
2222
"parse5": "^7.0.0",
2323
"prettier": "^3.0.0",
2424
"remark-cli": "^12.0.0",
25-
"remark-preset-wooorm": "^10.0.0",
25+
"remark-preset-wooorm": "^11.0.0",
2626
"to-vfile": "^8.0.0",
2727
"type-coverage": "^2.0.0",
2828
"typescript": "^5.0.0",
2929
"unist-util-visit": "^5.0.0",
30-
"xo": "^0.59.0"
30+
"xo": "^0.60.0"
3131
},
3232
"exports": "./index.js",
3333
"files": [

readme.md

Lines changed: 53 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
# hast-util-from-parse5
22

3-
[![Build][build-badge]][build]
4-
[![Coverage][coverage-badge]][coverage]
5-
[![Downloads][downloads-badge]][downloads]
6-
[![Size][size-badge]][size]
7-
[![Sponsors][sponsors-badge]][collective]
8-
[![Backers][backers-badge]][collective]
9-
[![Chat][chat-badge]][chat]
3+
[![Build][badge-build-image]][badge-build-url]
4+
[![Coverage][badge-coverage-image]][badge-coverage-url]
5+
[![Downloads][badge-downloads-image]][badge-downloads-url]
6+
[![Size][badge-size-image]][badge-size-url]
107

11-
[hast][] utility to transform from [`parse5`][parse5]s AST.
8+
[hast][github-hast] utility to transform from the
9+
[`parse5`][github-parse5] AST.
1210

1311
## Contents
1412

@@ -36,17 +34,17 @@ This package is a utility that can turn a parse5 tree into a hast tree.
3634
You can use this package when using `parse5` as an HTML parser and wanting to
3735
work with hast.
3836

39-
The utility [`hast-util-to-parse5`][hast-util-to-parse5] does the inverse of
40-
this utility.
37+
The utility [`hast-util-to-parse5`][github-hast-util-to-parse5] does the
38+
inverse of this utility.
4139
It generates `parse5`s AST again.
4240

43-
The utility [`hast-util-from-html`][hast-util-from-html] wraps this utility and
44-
`parse5` to both parse HTML and generate hast from it.
41+
The utility [`hast-util-from-html`][github-hast-util-from-html] wraps this
42+
utility and `parse5` to both parse HTML and generate hast from it.
4543

4644
## Install
4745

48-
This package is [ESM only][esm].
49-
In Node.js (version 16+), install with [npm][]:
46+
This package is [ESM only][github-gist-esm].
47+
In Node.js (version 16+), install with [npm][npmjs-install]:
5048

5149
```sh
5250
npm install hast-util-from-parse5
@@ -122,14 +120,14 @@ Transform a `parse5` AST to hast.
122120

123121
###### Parameters
124122

125-
* `tree` ([`Parse5Node`][parse5-node])
123+
* `tree` ([`Parse5Node`][github-parse5-node])
126124
`parse5` tree to transform
127125
* `options` ([`Options`][api-options], optional)
128126
— configuration
129127

130128
###### Returns
131129

132-
hast tree ([`HastNode`][hast-node]).
130+
hast tree ([`HastNode`][github-hast-nodes]).
133131

134132
### `Options`
135133

@@ -139,7 +137,8 @@ Configuration (TypeScript type).
139137

140138
###### `file`
141139

142-
File used to add positional info to nodes ([`VFile`][vfile], optional).
140+
File used to add positional info to nodes
141+
([`VFile`][github-vfile], optional).
143142

144143
If given, the file should represent the original HTML source.
145144

@@ -231,11 +230,11 @@ compatible with Node.js 16.
231230
## Security
232231
233232
Use of `hast-util-from-parse5` can open you up to a
234-
[cross-site scripting (XSS)][xss] attack if Parse5’s AST is unsafe.
233+
[cross-site scripting (XSS)][wikipedia-xss] attack if Parse5’s AST is unsafe.
235234
236235
## Related
237236
238-
* [`hast-util-to-parse5`](https://github.com/syntax-tree/hast-util-to-parse5)
237+
* [`hast-util-to-parse5`][github-hast-util-to-parse5]
239238
— transform hast to Parse5’s AST
240239
* [`hast-util-to-nlcst`](https://github.com/syntax-tree/hast-util-to-nlcst)
241240
— transform hast to nlcst
@@ -250,84 +249,76 @@ Use of `hast-util-from-parse5` can open you up to a
250249
251250
## Contribute
252251
253-
See [`contributing.md`][contributing] in [`syntax-tree/.github`][health] for
254-
ways to get started.
255-
See [`support.md`][support] for ways to get help.
252+
See [`contributing.md`][health-contributing]
253+
in
254+
[`syntax-tree/.github`][health]
255+
for ways to get started.
256+
See [`support.md`][health-support] for ways to get help.
256257
257-
This project has a [code of conduct][coc].
258+
This project has a [code of conduct][health-coc].
258259
By interacting with this repository, organization, or community you agree to
259260
abide by its terms.
260261
261262
## License
262263
263-
[MIT][license] © [Titus Wormer][author]
264+
[MIT][file-license] © [Titus Wormer][wooorm]
264265
265266
<!-- Definitions -->
266267
267-
[build-badge]: https://github.com/syntax-tree/hast-util-from-parse5/workflows/main/badge.svg
268-
269-
[build]: https://github.com/syntax-tree/hast-util-from-parse5/actions
270-
271-
[coverage-badge]: https://img.shields.io/codecov/c/github/syntax-tree/hast-util-from-parse5.svg
272-
273-
[coverage]: https://codecov.io/github/syntax-tree/hast-util-from-parse5
274-
275-
[downloads-badge]: https://img.shields.io/npm/dm/hast-util-from-parse5.svg
268+
[api-from-parse5]: #fromparse5tree-options
276269
277-
[downloads]: https://www.npmjs.com/package/hast-util-from-parse5
270+
[api-options]: #options
278271
279-
[size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=hast-util-from-parse5
272+
[api-space]: #space-1
280273
281-
[size]: https://bundlejs.com/?q=hast-util-from-parse5
274+
[badge-build-image]: https://github.com/syntax-tree/hast-util-from-parse5/workflows/main/badge.svg
282275
283-
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
276+
[badge-build-url]: https://github.com/syntax-tree/hast-util-from-parse5/actions
284277
285-
[backers-badge]: https://opencollective.com/unified/backers/badge.svg
278+
[badge-coverage-image]: https://img.shields.io/codecov/c/github/syntax-tree/hast-util-from-parse5.svg
286279
287-
[collective]: https://opencollective.com/unified
280+
[badge-coverage-url]: https://codecov.io/github/syntax-tree/hast-util-from-parse5
288281
289-
[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg
282+
[badge-downloads-image]: https://img.shields.io/npm/dm/hast-util-from-parse5.svg
290283
291-
[chat]: https://github.com/syntax-tree/unist/discussions
284+
[badge-downloads-url]: https://www.npmjs.com/package/hast-util-from-parse5
292285
293-
[npm]: https://docs.npmjs.com/cli/install
286+
[badge-size-image]: https://img.shields.io/bundlejs/size/hast-util-from-parse5
294287
295-
[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
288+
[badge-size-url]: https://bundlejs.com/?q=hast-util-from-parse5
296289
297290
[esmsh]: https://esm.sh
298291
299-
[typescript]: https://www.typescriptlang.org
292+
[file-license]: license
300293
301-
[license]: license
294+
[github-gist-esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
302295
303-
[author]: https://wooorm.com
296+
[github-hast]: https://github.com/syntax-tree/hast
304297
305-
[health]: https://github.com/syntax-tree/.github
306-
307-
[contributing]: https://github.com/syntax-tree/.github/blob/main/contributing.md
298+
[github-hast-nodes]: https://github.com/syntax-tree/hast#nodes
308299
309-
[support]: https://github.com/syntax-tree/.github/blob/main/support.md
300+
[github-hast-util-from-html]: https://github.com/syntax-tree/hast-util-from-html
310301
311-
[coc]: https://github.com/syntax-tree/.github/blob/main/code-of-conduct.md
302+
[github-hast-util-to-parse5]: https://github.com/syntax-tree/hast-util-to-parse5
312303
313-
[xss]: https://en.wikipedia.org/wiki/Cross-site_scripting
304+
[github-parse5]: https://github.com/inikulin/parse5
314305
315-
[parse5]: https://github.com/inikulin/parse5
306+
[github-parse5-node]: https://github.com/inikulin/parse5/blob/master/packages/parse5/lib/tree-adapters/default.ts
316307
317-
[parse5-node]: https://github.com/inikulin/parse5/blob/master/packages/parse5/lib/tree-adapters/default.ts
308+
[github-vfile]: https://github.com/vfile/vfile
318309
319-
[vfile]: https://github.com/vfile/vfile
310+
[health]: https://github.com/syntax-tree/.github
320311
321-
[hast-util-to-parse5]: https://github.com/syntax-tree/hast-util-to-parse5
312+
[health-coc]: https://github.com/syntax-tree/.github/blob/main/code-of-conduct.md
322313
323-
[hast]: https://github.com/syntax-tree/hast
314+
[health-contributing]: https://github.com/syntax-tree/.github/blob/main/contributing.md
324315
325-
[hast-util-from-html]: https://github.com/syntax-tree/hast-util-from-html
316+
[health-support]: https://github.com/syntax-tree/.github/blob/main/support.md
326317
327-
[hast-node]: https://github.com/syntax-tree/hast#nodes
318+
[npmjs-install]: https://docs.npmjs.com/cli/install
328319
329-
[api-from-parse5]: #fromparse5tree-options
320+
[typescript]: https://www.typescriptlang.org
330321
331-
[api-options]: #options
322+
[wikipedia-xss]: https://en.wikipedia.org/wiki/Cross-site_scripting
332323
333-
[api-space]: #space-1
324+
[wooorm]: https://wooorm.com

0 commit comments

Comments
 (0)