Skip to content

Commit 0a0e172

Browse files
committed
Update dev-dependencies
1 parent 2ee5cdc commit 0a0e172

File tree

3 files changed

+19
-17
lines changed

3 files changed

+19
-17
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,19 +50,19 @@
5050
"devDependencies": {
5151
"@types/tape": "^4.0.0",
5252
"c8": "^7.0.0",
53-
"github-slugger": "^1.0.0",
53+
"github-slugger": "^2.0.0",
5454
"hast-util-to-html": "^8.0.0",
5555
"mdast-util-to-hast": "^12.0.0",
5656
"micromark-extension-gfm": "^2.0.0",
5757
"node-fetch": "^3.0.0",
5858
"prettier": "^2.0.0",
59-
"remark-cli": "^10.0.0",
59+
"remark-cli": "^11.0.0",
6060
"remark-preset-wooorm": "^9.0.0",
6161
"rimraf": "^3.0.0",
6262
"tape": "^5.0.0",
6363
"type-coverage": "^2.0.0",
6464
"typescript": "^4.0.0",
65-
"xo": "^0.49.0"
65+
"xo": "^0.53.0"
6666
},
6767
"scripts": {
6868
"build": "rimraf \"lib/**/*.d.ts\" \"*.d.ts\" && tsc && type-coverage",

script/crawl-tests.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1+
import assert from 'node:assert/strict'
12
import fs from 'node:fs'
23
import path from 'node:path'
34
import fetch from 'node-fetch'
45

5-
fetch(
6+
const response = await fetch(
67
'https://api.github.com/repos/micromark/micromark-extension-gfm/contents/test/spec.js',
78
{headers: {Accept: 'application/vnd.github.v3.raw'}}
8-
).then((response) => {
9-
response.body.pipe(fs.createWriteStream(path.join('test', 'spec.js')))
10-
})
9+
)
10+
assert(response.body, 'expected body')
11+
response.body.pipe(fs.createWriteStream(path.join('test', 'spec.js')))

test/index.js

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
import assert from 'node:assert/strict'
12
import fs from 'node:fs'
23
import path from 'node:path'
34
import test from 'tape'
4-
import Slugger from 'github-slugger'
5+
import {slug} from 'github-slugger'
56
import {toHast} from 'mdast-util-to-hast'
67
import {toHtml} from 'hast-util-to-html'
78
import {fromMarkdown} from 'mdast-util-from-markdown'
@@ -18,7 +19,7 @@ test('markdown -> mdast', (t) => {
1819

1920
while (++index < files.length) {
2021
const example = files[index]
21-
const category = Slugger.slug(example.category)
22+
const category = slug(example.category)
2223
const name = index + '-' + category
2324
const fixtureHtmlPath = path.join('test', name + '.html')
2425
const fixtureMarkdownPath = path.join('test', name + '.md')
@@ -28,14 +29,14 @@ test('markdown -> mdast', (t) => {
2829
mdastExtensions: [gfmFromMarkdown()]
2930
})
3031

31-
const html = toHtml(
32-
toHast(mdast, {allowDangerousHtml: true, commonmark: true}),
33-
{
34-
allowDangerousHtml: true,
35-
entities: {useNamedReferences: true},
36-
closeSelfClosing: true
37-
}
38-
)
32+
const hast = toHast(mdast, {allowDangerousHtml: true, commonmark: true})
33+
assert(hast, 'expected node')
34+
35+
const html = toHtml(hast, {
36+
allowDangerousHtml: true,
37+
entities: {useNamedReferences: true},
38+
closeSelfClosing: true
39+
})
3940

4041
let fixtureHtml
4142
let fixtureMarkdown

0 commit comments

Comments
 (0)