Skip to content

Commit d21e657

Browse files
committed
Update @types/mdast, mdast utilities
1 parent 3ead246 commit d21e657

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,19 @@
3939
"index.js"
4040
],
4141
"dependencies": {
42-
"@types/mdast": "^3.0.0",
42+
"@types/mdast": "^4.0.0",
4343
"ccount": "^2.0.0",
44-
"mdast-util-find-and-replace": "^2.0.0",
45-
"micromark-util-character": "^1.0.0"
44+
"mdast-util-find-and-replace": "^3.0.0",
45+
"micromark-util-character": "^2.0.0"
4646
},
4747
"devDependencies": {
4848
"@types/node": "^20.0.0",
49-
"c8": "^7.0.0",
49+
"c8": "^8.0.0",
5050
"hast-util-to-html": "^8.0.0",
51-
"mdast-util-from-markdown": "^1.0.0",
51+
"mdast-util-from-markdown": "^2.0.0",
5252
"mdast-util-to-hast": "^12.0.0",
53-
"mdast-util-to-markdown": "^1.0.0",
54-
"micromark-extension-gfm-autolink-literal": "^1.0.0",
53+
"mdast-util-to-markdown": "^2.0.0",
54+
"micromark-extension-gfm-autolink-literal": "^2.0.0",
5555
"prettier": "^2.0.0",
5656
"remark-cli": "^11.0.0",
5757
"remark-preset-wooorm": "^9.0.0",

test/index.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ test('gfmAutolinkLiteralFromMarkdown', () => {
2525
fromMarkdown(
2626
'www.example.com, https://example.com, and contact@example.com.',
2727
{
28-
extensions: [gfmAutolinkLiteral],
28+
extensions: [gfmAutolinkLiteral()],
2929
mdastExtensions: [gfmAutolinkLiteralFromMarkdown]
3030
}
3131
),
@@ -133,7 +133,7 @@ test('gfmAutolinkLiteralFromMarkdown', () => {
133133

134134
assert.deepEqual(
135135
fromMarkdown('[https://google.com](https://google.com)', {
136-
extensions: [gfmAutolinkLiteral],
136+
extensions: [gfmAutolinkLiteral()],
137137
mdastExtensions: [gfmAutolinkLiteralFromMarkdown]
138138
}),
139139
{
@@ -409,14 +409,14 @@ test('gfmAutolinkLiteralToMarkdown', async () => {
409409
const input = await fs.readFile(inputUrl)
410410
const expected = String(await fs.readFile(expectedUrl))
411411

412-
const hast = toHast(
413-
fromMarkdown(input, {
414-
extensions: [gfmAutolinkLiteral],
415-
mdastExtensions: [gfmAutolinkLiteralFromMarkdown]
416-
}),
417-
{allowDangerousHtml: true}
418-
)
412+
const mdast = fromMarkdown(input, {
413+
extensions: [gfmAutolinkLiteral()],
414+
mdastExtensions: [gfmAutolinkLiteralFromMarkdown]
415+
})
416+
417+
const hast = toHast(mdast, {allowDangerousHtml: true})
419418
assert(hast && hast.type === 'root', 'expected root')
419+
420420
let actual = toHtml(hast, {
421421
allowDangerousHtml: true,
422422
entities: {useNamedReferences: true}

0 commit comments

Comments
 (0)