From 64aeb0db51df3ec93e50fa702868173100bce274 Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Tue, 19 Sep 2023 15:47:56 +0200 Subject: [PATCH] Update dev-dependencies --- lib/index.js | 2 +- package.json | 4 ++-- test.js | 15 ++------------- 3 files changed, 5 insertions(+), 16 deletions(-) diff --git a/lib/index.js b/lib/index.js index f75c9f7..00f717a 100644 --- a/lib/index.js +++ b/lib/index.js @@ -2,7 +2,7 @@ * @typedef {import('hast').Root} HastRoot * @typedef {import('hast-util-to-mdast').Options} Options * @typedef {import('mdast').Root} MdastRoot - * @typedef {import('unified').Processor} Processor + * @typedef {import('unified').Processor} Processor * @typedef {import('vfile').VFile} VFile */ diff --git a/package.json b/package.json index 4844ca8..ddd07f9 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "rehype-stringify": "^10.0.0", "remark-cli": "^11.0.0", "remark-preset-wooorm": "^9.0.0", - "remark-stringify": "^10.0.0", + "remark-stringify": "^11.0.0", "type-coverage": "^2.0.0", "typescript": "^5.0.0", "xo": "^0.56.0" @@ -58,7 +58,7 @@ "prepack": "npm run build && npm run format", "test": "npm run build && npm run format && npm run test-coverage", "test-api": "node --conditions development test.js", - "test-coverage": "c8 --100 --check-coverage --reporter lcov npm run test-api" + "test-coverage": "c8 --100 --reporter lcov npm run test-api" }, "prettier": { "bracketSpacing": false, diff --git a/test.js b/test.js index 0d231e8..5c6a816 100644 --- a/test.js +++ b/test.js @@ -21,7 +21,6 @@ test('rehypeRemark', async function (t) { const file = await unified() .use(rehypeParse) .use(rehypeRemark) - // @ts-expect-error: to do: remove when `remark` is released. .use(remarkStringify) .process('

Hello, world!

') @@ -29,13 +28,10 @@ test('rehypeRemark', async function (t) { }) await t.test('should bridge', async function () { - // @ts-expect-error: to do: remove when `remark` is released. - const destination = unified().use(remarkStringify) - const file = await unified() .use(rehypeParse, {fragment: true}) - // @ts-expect-error: to do: remove when `remark` is released. - .use(rehypeRemark, destination) + // @ts-expect-error: TS currently barfs on overloads that result in mutate/bridges. + .use(rehypeRemark, unified()) .use(rehypeStringify) .process('

Hello, world!

') @@ -46,14 +42,9 @@ test('rehypeRemark', async function (t) { const file = await unified() .use(rehypeParse, {fragment: true}) .use(rehypeRemark, {document: false}) - // @ts-expect-error: to do: remove when `remark` is released. .use(remarkStringify) .process('Hello, world!') - // This one looks buggy, but that’s ’cause `remark-stringify` always expects - // a complete document. - // The fact that it bugs-out thus shows that the phrasing are handled - // normally. assert.equal(String(file), '*Hello*, **world**!\n') }) @@ -61,7 +52,6 @@ test('rehypeRemark', async function (t) { const file = await unified() .use(rehypeParse, {fragment: true}) .use(rehypeRemark) - // @ts-expect-error: to do: remove when `remark` is released. .use(remarkStringify) .processSync('Hello, world!') @@ -87,7 +77,6 @@ test('rehypeRemark', async function (t) { } } }) - // @ts-expect-error: to do: remove when `remark` is released. .use(remarkStringify) .process('
example
')