build: patch markdown-it-anchor types

pull/3772/head
meteorlxy 1 year ago
parent 5f054eeec2
commit f3aa8b9d85

@ -223,7 +223,8 @@
"ora>string-width": "^5" "ora>string-width": "^5"
}, },
"patchedDependencies": { "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"
} }
} }
} }

@ -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<string, string | number>;
+ export type RenderHref = (slug: string, state: StateCore) => string;
+ export type RenderAttrs = (slug: string, state: StateCore) => Record<string, string | number>;
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;

@ -11,6 +11,9 @@ patchedDependencies:
'@types/markdown-it@14.0.0': '@types/markdown-it@14.0.0':
hash: 324uktmxmvfeckydcv3tuzbvze hash: 324uktmxmvfeckydcv3tuzbvze
path: patches/@types__markdown-it@14.0.0.patch 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: importers:
@ -196,7 +199,7 @@ importers:
version: 14.1.0 version: 14.1.0
markdown-it-anchor: markdown-it-anchor:
specifier: ^8.6.7 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: markdown-it-attrs:
specifier: ^4.1.6 specifier: ^4.1.6
version: 4.1.6(markdown-it@14.1.0) version: 4.1.6(markdown-it@14.1.0)
@ -3359,7 +3362,7 @@ packages:
resolution: {integrity: sha512-1I+1qpDt4idfgLQG+BNWmrqku+7/2bi5nLf4YwF8y8zXvmfiTBY3PV3ZibfrjBueCByROpuBjLLFCajqkgYoLQ==} resolution: {integrity: sha512-1I+1qpDt4idfgLQG+BNWmrqku+7/2bi5nLf4YwF8y8zXvmfiTBY3PV3ZibfrjBueCByROpuBjLLFCajqkgYoLQ==}
dev: false 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==} resolution: {integrity: sha512-FlCHFwNnutLgVTflOYHPW2pPcl2AACqVzExlkGQNsi4CJgqOHN7YTgDd4LuhgN1BFO3TS0vLAruV1Td6dwWPJA==}
peerDependencies: peerDependencies:
'@types/markdown-it': '*' '@types/markdown-it': '*'
@ -3368,6 +3371,7 @@ packages:
'@types/markdown-it': 14.0.0(patch_hash=324uktmxmvfeckydcv3tuzbvze) '@types/markdown-it': 14.0.0(patch_hash=324uktmxmvfeckydcv3tuzbvze)
markdown-it: 14.1.0 markdown-it: 14.1.0
dev: true dev: true
patched: true
/markdown-it-attrs@4.1.6(markdown-it@14.1.0): /markdown-it-attrs@4.1.6(markdown-it@14.1.0):
resolution: {integrity: sha512-O7PDKZlN8RFMyDX13JnctQompwrrILuz2y43pW2GagcwpIIElkAdfeek+erHfxUOlXWPsjFeWmZ8ch1xtRLWpA==} resolution: {integrity: sha512-O7PDKZlN8RFMyDX13JnctQompwrrILuz2y43pW2GagcwpIIElkAdfeek+erHfxUOlXWPsjFeWmZ8ch1xtRLWpA==}

Loading…
Cancel
Save