Skip to content

Commit

Permalink
Update @types/hast, unified, utilities, etc
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Sep 5, 2023
1 parent a7b68a8 commit 394560f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions lib/index.js
Expand Up @@ -61,7 +61,7 @@ export default function rehypeAutolinkHeadings(options = {}) {
const group = options.group
const is = convertElement(options.test)

/** @type {import('unist-util-visit/complex-types').Visitor<Element>} */
/** @type {import('unist-util-visit').Visitor<Element>} */
let method

if (behavior === 'wrap') {
Expand All @@ -88,7 +88,7 @@ export default function rehypeAutolinkHeadings(options = {}) {
})
}

/** @type {import('unist-util-visit/complex-types').Visitor<Element>} */
/** @type {import('unist-util-visit').Visitor<Element>} */
function inject(node) {
node.children[behavior === 'prepend' ? 'unshift' : 'push'](
create(node, extend(true, {}, props), toChildren(content, node))
Expand All @@ -97,7 +97,7 @@ export default function rehypeAutolinkHeadings(options = {}) {
return [SKIP]
}

/** @type {import('unist-util-visit/complex-types').Visitor<Element>} */
/** @type {import('unist-util-visit').Visitor<Element>} */
function around(node, index, parent) {
// Uncommon.
/* c8 ignore next */
Expand All @@ -124,7 +124,7 @@ export default function rehypeAutolinkHeadings(options = {}) {
return [SKIP, index + nodes.length]
}

/** @type {import('unist-util-visit/complex-types').Visitor<Element>} */
/** @type {import('unist-util-visit').Visitor<Element>} */
function wrap(node) {
node.children = [create(node, extend(true, {}, props), node.children)]
return [SKIP]
Expand Down
16 changes: 8 additions & 8 deletions package.json
Expand Up @@ -32,13 +32,13 @@
"index.js"
],
"dependencies": {
"@types/hast": "^2.0.0",
"@types/hast": "^3.0.0",
"extend": "^3.0.0",
"hast-util-has-property": "^2.0.0",
"hast-util-heading-rank": "^2.0.0",
"hast-util-is-element": "^2.0.0",
"unified": "^10.0.0",
"unist-util-visit": "^4.0.0"
"hast-util-has-property": "^3.0.0",
"hast-util-heading-rank": "^3.0.0",
"hast-util-is-element": "^3.0.0",
"unified": "^11.0.0",
"unist-util-visit": "^5.0.0"
},
"devDependencies": {
"@types/extend": "^3.0.0",
Expand All @@ -47,12 +47,12 @@
"c8": "^8.0.0",
"is-hidden": "^2.0.0",
"prettier": "^3.0.0",
"rehype": "^12.0.0",
"rehype": "^13.0.0",
"remark-cli": "^11.0.0",
"remark-preset-wooorm": "^9.0.0",
"rimraf": "^3.0.0",
"tape": "^5.0.0",
"to-vfile": "^7.0.0",
"to-vfile": "^8.0.0",
"type-coverage": "^2.0.0",
"typescript": "^5.0.0",
"xo": "^0.56.0"
Expand Down
2 changes: 1 addition & 1 deletion test/index.js
Expand Up @@ -86,7 +86,7 @@ test('rehypeAutolinkHeadings', (t) => {
.process('<h1 id=a>b</h1>', (error, file) => {
t.deepEqual(
[error, (file || {messages: []}).messages.length, String(file)],
[null, 0, '<div><h1 id="a">b</h1><a href="#a"><i></i></a></div>']
[undefined, 0, '<div><h1 id="a">b</h1><a href="#a"><i></i></a></div>']
)
})
})
Expand Down

0 comments on commit 394560f

Please sign in to comment.