Skip to content

Commit 1ee0c28

Browse files
committed
Replace some dev-dependencies
1 parent 940247a commit 1ee0c28

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,11 @@
5555
"devDependencies": {
5656
"@types/tape": "^4.0.0",
5757
"c8": "^7.0.0",
58+
"mdast-util-from-markdown": "^1.0.0",
59+
"mdast-util-gfm": "^2.0.0",
60+
"micromark-extension-gfm": "^2.0.0",
5861
"prettier": "^2.0.0",
59-
"remark": "^14.0.0",
6062
"remark-cli": "^10.0.0",
61-
"remark-gfm": "^3.0.0",
6263
"remark-preset-wooorm": "^9.0.0",
6364
"rimraf": "^3.0.0",
6465
"tape": "^5.0.0",

test.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@
66

77
import assert from 'node:assert'
88
import test from 'tape'
9-
import {remark} from 'remark'
10-
import gfm from 'remark-gfm'
9+
import {fromMarkdown} from 'mdast-util-from-markdown'
10+
import {gfmFromMarkdown} from 'mdast-util-gfm'
11+
import {gfm} from 'micromark-extension-gfm'
1112
import {visit, CONTINUE, EXIT, SKIP} from './index.js'
1213

13-
const tree = remark().parse('Some _emphasis_, **importance**, and `code`.')
14+
const tree = fromMarkdown('Some _emphasis_, **importance**, and `code`.')
1415

1516
const stopIndex = 5
1617
const skipIndex = 7
@@ -425,14 +426,13 @@ test('unist-util-visit', (t) => {
425426
})
426427

427428
t.test('should visit added nodes', (t) => {
428-
const tree = remark().parse('Some _emphasis_, **importance**, and `code`.')
429-
430-
// Unified doesn't know parse result type,
431-
// all we know is that it's a node, but we know it is a parent, so we
432-
// assert that here
433-
const other = /** @type{Parent} */ (
434-
remark().use(gfm).parse('Another ~~sentence~~.')
435-
).children[0]
429+
const tree = fromMarkdown('Some _emphasis_, **importance**, and `code`.')
430+
const other = /** @type {Parent} */ (
431+
fromMarkdown('Another ~~sentence~~.', {
432+
extensions: [gfm()],
433+
mdastExtensions: [gfmFromMarkdown()]
434+
}).children[0]
435+
)
436436

437437
const l = types.length + 5 // (p, text, delete, text, text)
438438
let n = 0

0 commit comments

Comments
 (0)