diff --git a/index.js b/index.js index fbb6bdf..cc44896 100644 --- a/index.js +++ b/index.js @@ -29,7 +29,8 @@ export default function remarkFrontmatter(options = 'yaml') { function add(field, value) { const list = /** @type {unknown[]} */ ( // Other extensions - /* c8 ignore next 2 */ + /* c8 ignore next 3 */ + // @ts-expect-error: to do: remove when remark is released. data[field] ? data[field] : (data[field] = []) ) diff --git a/package.json b/package.json index 86d39e1..aacea88 100644 --- a/package.json +++ b/package.json @@ -35,10 +35,10 @@ "index.js" ], "dependencies": { - "@types/mdast": "^3.0.0", - "mdast-util-frontmatter": "^1.0.0", - "micromark-extension-frontmatter": "^1.0.0", - "unified": "^10.0.0" + "@types/mdast": "^4.0.0", + "mdast-util-frontmatter": "^2.0.0", + "micromark-extension-frontmatter": "^2.0.0", + "unified": "^11.0.0" }, "devDependencies": { "@types/tape": "^5.0.0", @@ -50,9 +50,10 @@ "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", + "vfile": "^6.0.0", "xo": "^0.56.0" }, "scripts": { diff --git a/test/index.js b/test/index.js index d03fa8d..f55acd8 100644 --- a/test/index.js +++ b/test/index.js @@ -15,6 +15,7 @@ import remarkFrontmatter from '../index.js' test('remarkFrontmatter', (t) => { t.doesNotThrow(() => { + // @ts-expect-error: remove when remark is released. remark().use(remarkFrontmatter).freeze() }, 'should not throw if not passed options') @@ -91,7 +92,10 @@ test('fixtures', (t) => { ) } catch {} + // @ts-expect-error: remove when remark is released. const proc = remark().use(remarkFrontmatter, config) + /** @type {Root} */ + // @ts-expect-error: remove when remark is released. const actual = proc.parse(input) try { @@ -112,6 +116,7 @@ test('fixtures', (t) => { } st.deepEqual(actual, expected, 'tree') + // @ts-expect-error: remove when remark is released. st.equal(String(proc.processSync(input)), String(output), 'process') st.end() })