Skip to content

Commit 1a14a64

Browse files
committed
Update @types/hast, utilities
1 parent 32eb0ef commit 1a14a64

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

lib/index.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,12 @@
33
* @typedef {import('hast').Root} Root
44
* @typedef {import('hast').Element} Element
55
* @typedef {import('hast').Content} Content
6+
* @typedef {import('hast').Nodes} Nodes
67
* @typedef {import('hast-util-is-element').Test} Test
78
* @typedef {import('unist-util-visit-parents').VisitorResult} VisitorResult
89
*/
910

1011
/**
11-
* @typedef {Root | Content} Node
12-
*
1312
* @typedef RegExpMatchObject
1413
* Info on the match.
1514
* @property {number} index
@@ -81,7 +80,7 @@ export const defaultIgnore = ['math', 'script', 'style', 'svg', 'title']
8180
* nodes.
8281
* Partial matches are not supported.
8382
*
84-
* @template {Node} Tree
83+
* @template {Nodes} Tree
8584
* Node type.
8685
* @param {Tree} tree
8786
* Tree to change.
@@ -125,7 +124,7 @@ export function findAndReplace(tree, find, replace, options) {
125124
// To do next major: don’t return the given tree.
126125
return tree
127126

128-
/** @type {import('unist-util-visit-parents/complex-types.js').BuildVisitor<Node, 'text'>} */
127+
/** @type {import('unist-util-visit-parents').BuildVisitor<Nodes, 'text'>} */
129128
function visitor(node, parents) {
130129
let index = -1
131130
/** @type {Root | Element | undefined} */

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,15 @@
3333
"index.js"
3434
],
3535
"dependencies": {
36+
"@types/hast": "^3.0.0",
3637
"escape-string-regexp": "^5.0.0",
37-
"hast-util-is-element": "^2.0.0",
38-
"unist-util-visit-parents": "^5.0.0"
38+
"hast-util-is-element": "^3.0.0",
39+
"unist-util-visit-parents": "^6.0.0"
3940
},
4041
"devDependencies": {
4142
"@types/node": "^20.0.0",
4243
"c8": "^8.0.0",
43-
"hastscript": "^7.0.0",
44+
"hastscript": "^8.0.0",
4445
"prettier": "^3.0.0",
4546
"remark-cli": "^11.0.0",
4647
"remark-preset-wooorm": "^9.0.0",

0 commit comments

Comments
 (0)