diff --git a/package.json b/package.json index 46b779d3..07275ba1 100644 --- a/package.json +++ b/package.json @@ -223,7 +223,8 @@ "ora>string-width": "^5" }, "patchedDependencies": { - "@types/markdown-it@14.0.0": "patches/@types__markdown-it@14.0.0.patch" + "@types/markdown-it@14.0.0": "patches/@types__markdown-it@14.0.0.patch", + "markdown-it-anchor@8.6.7": "patches/markdown-it-anchor@8.6.7.patch" } } } diff --git a/patches/markdown-it-anchor@8.6.7.patch b/patches/markdown-it-anchor@8.6.7.patch new file mode 100644 index 00000000..37bfd174 --- /dev/null +++ b/patches/markdown-it-anchor@8.6.7.patch @@ -0,0 +1,29 @@ +diff --git a/types/index.d.ts b/types/index.d.ts +index 7c94aae194faa66ca006ace98cdb0dee82a3e471..0377cace7c4a9653d4ecf963babffd4bd68494b0 100644 +--- a/types/index.d.ts ++++ b/types/index.d.ts +@@ -1,10 +1,10 @@ +-import MarkdownIt = require('markdown-it'); +-import Token = require('markdown-it/lib/token'); +-import State = require('markdown-it/lib/rules_core/state_core'); ++import MarkdownIt from 'markdown-it'; ++import Token from 'markdown-it/lib/token.mjs'; ++import StateCore from 'markdown-it/lib/rules_core/state_core.mjs'; + + declare namespace anchor { +- export type RenderHref = (slug: string, state: State) => string; +- export type RenderAttrs = (slug: string, state: State) => Record; ++ export type RenderHref = (slug: string, state: StateCore) => string; ++ export type RenderAttrs = (slug: string, state: StateCore) => Record; + + export interface PermalinkOptions { + class?: string, +@@ -37,7 +37,7 @@ declare namespace anchor { + placement?: 'before' | 'after' + } + +- export type PermalinkGenerator = (slug: string, opts: PermalinkOptions, state: State, index: number) => void; ++ export type PermalinkGenerator = (slug: string, opts: PermalinkOptions, state: StateCore, index: number) => void; + + export interface AnchorInfo { + slug: string; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0feeae64..899f26fb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,6 +11,9 @@ patchedDependencies: '@types/markdown-it@14.0.0': hash: 324uktmxmvfeckydcv3tuzbvze path: patches/@types__markdown-it@14.0.0.patch + markdown-it-anchor@8.6.7: + hash: 7jac6clbacexfaqdjyv4p6a5n4 + path: patches/markdown-it-anchor@8.6.7.patch importers: @@ -196,7 +199,7 @@ importers: version: 14.1.0 markdown-it-anchor: specifier: ^8.6.7 - version: 8.6.7(@types/markdown-it@14.0.0)(markdown-it@14.1.0) + version: 8.6.7(patch_hash=7jac6clbacexfaqdjyv4p6a5n4)(@types/markdown-it@14.0.0)(markdown-it@14.1.0) markdown-it-attrs: specifier: ^4.1.6 version: 4.1.6(markdown-it@14.1.0) @@ -3359,7 +3362,7 @@ packages: resolution: {integrity: sha512-1I+1qpDt4idfgLQG+BNWmrqku+7/2bi5nLf4YwF8y8zXvmfiTBY3PV3ZibfrjBueCByROpuBjLLFCajqkgYoLQ==} dev: false - /markdown-it-anchor@8.6.7(@types/markdown-it@14.0.0)(markdown-it@14.1.0): + /markdown-it-anchor@8.6.7(patch_hash=7jac6clbacexfaqdjyv4p6a5n4)(@types/markdown-it@14.0.0)(markdown-it@14.1.0): resolution: {integrity: sha512-FlCHFwNnutLgVTflOYHPW2pPcl2AACqVzExlkGQNsi4CJgqOHN7YTgDd4LuhgN1BFO3TS0vLAruV1Td6dwWPJA==} peerDependencies: '@types/markdown-it': '*' @@ -3368,6 +3371,7 @@ packages: '@types/markdown-it': 14.0.0(patch_hash=324uktmxmvfeckydcv3tuzbvze) markdown-it: 14.1.0 dev: true + patched: true /markdown-it-attrs@4.1.6(markdown-it@14.1.0): resolution: {integrity: sha512-O7PDKZlN8RFMyDX13JnctQompwrrILuz2y43pW2GagcwpIIElkAdfeek+erHfxUOlXWPsjFeWmZ8ch1xtRLWpA==}