From 11f80ebcb8318018ca98842279bf9329a560d888 Mon Sep 17 00:00:00 2001 From: hbsnow Date: Sat, 28 Jan 2023 02:41:42 +0900 Subject: [PATCH] fix: node16 --- package-lock.json | 8 ++++++++ package.json | 1 + src/index.ts | 3 +-- tsconfig.json | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index e812767..ce57208 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,6 +16,7 @@ "devDependencies": { "@types/node": "^18.11.18", "@vitest/coverage-c8": "^0.27.1", + "hast": "^1.0.0", "hastscript": "^7.2.0", "rehype-minify-whitespace": "^5.0.1", "rimraf": "^4.0.4", @@ -1012,6 +1013,13 @@ "node": ">= 0.4.0" } }, + "node_modules/hast": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/hast/-/hast-1.0.0.tgz", + "integrity": "sha512-vFUqlRV5C+xqP76Wwq2SrM0kipnmpxJm7OfvVXpB35Fp+Fn4MV+ozr+JZr5qFvyR1q/U+Foim2x+3P+x9S1PLA==", + "deprecated": "Renamed to rehype", + "dev": true + }, "node_modules/hast-util-embedded": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/hast-util-embedded/-/hast-util-embedded-2.0.0.tgz", diff --git a/package.json b/package.json index c4fb350..dc45118 100644 --- a/package.json +++ b/package.json @@ -34,6 +34,7 @@ "devDependencies": { "@types/node": "^18.11.18", "@vitest/coverage-c8": "^0.27.1", + "hast": "^1.0.0", "hastscript": "^7.2.0", "rehype-minify-whitespace": "^5.0.1", "rimraf": "^4.0.4", diff --git a/src/index.ts b/src/index.ts index b979f62..55b7229 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,9 +1,8 @@ import { Plugin } from "unified"; import { headingRank } from "hast-util-heading-rank"; import { heading } from "hast-util-heading"; -import type { Root, RootContent } from "hast"; +import type { Element, Root, RootContent } from "hast"; import type { Properties } from "hastscript"; -import type { Element } from "hastscript/lib/core"; export type RehypeSectionizeOptions = { properties?: Properties | undefined; diff --git a/tsconfig.json b/tsconfig.json index 7e4b144..ac2dd15 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "target": "ESNext", "module": "node16", - "moduleResolution": "Node", + "moduleResolution": "node16", "esModuleInterop": true, "strict": true, "lib": [