Skip to content

Commit cf244cd

Browse files
committedSep 14, 2023
Update @type/mdast, unified, utilities
1 parent cc280b5 commit cf244cd

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed
 

‎index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ export default function remarkFrontmatter(options = 'yaml') {
2929
function add(field, value) {
3030
const list = /** @type {unknown[]} */ (
3131
// Other extensions
32-
/* c8 ignore next 2 */
32+
/* c8 ignore next 3 */
33+
// @ts-expect-error: to do: remove when remark is released.
3334
data[field] ? data[field] : (data[field] = [])
3435
)
3536

‎package.json

+6-5
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@
3535
"index.js"
3636
],
3737
"dependencies": {
38-
"@types/mdast": "^3.0.0",
39-
"mdast-util-frontmatter": "^1.0.0",
40-
"micromark-extension-frontmatter": "^1.0.0",
41-
"unified": "^10.0.0"
38+
"@types/mdast": "^4.0.0",
39+
"mdast-util-frontmatter": "^2.0.0",
40+
"micromark-extension-frontmatter": "^2.0.0",
41+
"unified": "^11.0.0"
4242
},
4343
"devDependencies": {
4444
"@types/tape": "^5.0.0",
@@ -50,9 +50,10 @@
5050
"remark-preset-wooorm": "^9.0.0",
5151
"rimraf": "^3.0.0",
5252
"tape": "^5.0.0",
53-
"to-vfile": "^7.0.0",
53+
"to-vfile": "^8.0.0",
5454
"type-coverage": "^2.0.0",
5555
"typescript": "^5.0.0",
56+
"vfile": "^6.0.0",
5657
"xo": "^0.56.0"
5758
},
5859
"scripts": {

‎test/index.js

+5
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import remarkFrontmatter from '../index.js'
1515

1616
test('remarkFrontmatter', (t) => {
1717
t.doesNotThrow(() => {
18+
// @ts-expect-error: remove when remark is released.
1819
remark().use(remarkFrontmatter).freeze()
1920
}, 'should not throw if not passed options')
2021

@@ -91,7 +92,10 @@ test('fixtures', (t) => {
9192
)
9293
} catch {}
9394

95+
// @ts-expect-error: remove when remark is released.
9496
const proc = remark().use(remarkFrontmatter, config)
97+
/** @type {Root} */
98+
// @ts-expect-error: remove when remark is released.
9599
const actual = proc.parse(input)
96100

97101
try {
@@ -112,6 +116,7 @@ test('fixtures', (t) => {
112116
}
113117

114118
st.deepEqual(actual, expected, 'tree')
119+
// @ts-expect-error: remove when remark is released.
115120
st.equal(String(proc.processSync(input)), String(output), 'process')
116121
st.end()
117122
})

0 commit comments

Comments
 (0)
Please sign in to comment.