From 1ddcfb9e7f966797a6d0979616a6f9225734a49c Mon Sep 17 00:00:00 2001 From: kamiazya Date: Thu, 4 Jul 2024 19:32:13 +0900 Subject: [PATCH] Update typedoc to 0.26 --- example/package.json | 2 +- example/tsdoc.json | 6 +++ package.json | 10 ++-- pnpm-lock.yaml | 122 +++++++++++++++++++++++++++---------------- src/plugin.ts | 7 +-- tsdoc.json | 9 ++++ 6 files changed, 100 insertions(+), 56 deletions(-) create mode 100644 example/tsdoc.json create mode 100644 tsdoc.json diff --git a/example/package.json b/example/package.json index 6dfb837..357d6bf 100644 --- a/example/package.json +++ b/example/package.json @@ -6,7 +6,7 @@ "doc": "typedoc" }, "devDependencies": { - "typedoc": "^0.25.13", + "typedoc": "^0.26.3", "typedoc-plugin-mermaid": "workspace:*" } } diff --git a/example/tsdoc.json b/example/tsdoc.json new file mode 100644 index 0000000..756ac20 --- /dev/null +++ b/example/tsdoc.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", + "extends": [ + "typedoc-plugin-mermaid/tsdoc.json" + ] +} diff --git a/package.json b/package.json index a88232b..4146dc7 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,8 @@ "import": "./dist/typedoc-plugin-mermaid.mjs", "require": "./dist/typedoc-plugin-mermaid.js" }, - "./package.json": "./package.json" + "./package.json": "./package.json", + "./tsdoc.json": "./tsdoc.json" }, "repository": { "type": "git", @@ -36,7 +37,8 @@ "node": ">=16.0.0" }, "files": [ - "dist" + "dist", + "tsdoc.json" ], "publishConfig": { "provenance": true @@ -53,7 +55,7 @@ "html-escaper": "^3.0.3" }, "peerDependencies": { - "typedoc": ">=0.23.0 || 0.24.x || 0.25.x" + "typedoc": ">=0.23.0 || 0.24.x || 0.25.x || 0.26.x" }, "devDependencies": { "@biomejs/biome": "1.8.1", @@ -61,7 +63,7 @@ "@changesets/cli": "^2.27.5", "@types/html-escaper": "^3.0.0", "@types/node": "^20.14.2", - "typedoc": "^0.25.13", + "typedoc": "^0.26.3", "typescript": "^5.4.5", "vite": "^5.2.13", "vitest": "^1.6.0" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 471c1b0..3dfde6f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -28,8 +28,8 @@ importers: specifier: ^20.14.2 version: 20.14.2 typedoc: - specifier: ^0.25.13 - version: 0.25.13(typescript@5.4.5) + specifier: ^0.26.3 + version: 0.26.3(typescript@5.4.5) typescript: specifier: ^5.4.5 version: 5.4.5 @@ -43,8 +43,8 @@ importers: example: devDependencies: typedoc: - specifier: ^0.25.13 - version: 0.25.13(typescript@5.4.5) + specifier: ^0.26.3 + version: 0.26.3(typescript@5.4.5) typedoc-plugin-mermaid: specifier: workspace:* version: link:.. @@ -424,6 +424,9 @@ packages: cpu: [x64] os: [win32] + '@shikijs/core@1.10.1': + resolution: {integrity: sha512-qdiJS5a/QGCff7VUFIqd0hDdWly9rDp8lhVmXVrS11aazX8LOTRLHAXkkEeONNsS43EcCd7gax9LLoOz4vlFQA==} + '@sinclair/typebox@0.27.8': resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} @@ -504,9 +507,6 @@ packages: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} - ansi-sequence-parser@1.1.1: - resolution: {integrity: sha512-vJXt3yiaUL4UU546s3rPXlsry/RnM730G1+HkpKE012AN0sx1eOrxSu95oKDIonskeLTijMgqWZ3uDEe3NFvyg==} - ansi-styles@3.2.1: resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} engines: {node: '>=4'} @@ -522,6 +522,9 @@ packages: argparse@1.0.10: resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} + argparse@2.0.1: + resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + array-buffer-byte-length@1.0.1: resolution: {integrity: sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==} engines: {node: '>= 0.4'} @@ -760,6 +763,10 @@ packages: resolution: {integrity: sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==} engines: {node: '>=8.6'} + entities@4.5.0: + resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} + engines: {node: '>=0.12'} + error-ex@1.3.2: resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} @@ -1128,9 +1135,6 @@ packages: json-parse-even-better-errors@2.3.1: resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} - jsonc-parser@3.2.1: - resolution: {integrity: sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==} - jsonfile@4.0.0: resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} @@ -1149,6 +1153,9 @@ packages: lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} + linkify-it@5.0.0: + resolution: {integrity: sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==} + load-yaml-file@0.2.0: resolution: {integrity: sha512-OfCBkGEw4nN6JLtgRidPX6QxjBQGQf72q3si2uvqyFEMbycSFFHwAZeXx6cJgFM9wmLrf9zBwCP3Ivqa+LLZPw==} engines: {node: '>=6'} @@ -1191,11 +1198,13 @@ packages: resolution: {integrity: sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==} engines: {node: '>=8'} - marked@4.3.0: - resolution: {integrity: sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==} - engines: {node: '>= 12'} + markdown-it@14.1.0: + resolution: {integrity: sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==} hasBin: true + mdurl@2.0.0: + resolution: {integrity: sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==} + meow@6.1.1: resolution: {integrity: sha512-3YffViIt2QWgTy6Pale5QpopX/IvU3LPL03jOTqp6pGj3VjesdO/U8CuHMKpnQr4shCNCM5fd5XFFvIIl6JBHg==} engines: {node: '>=8'} @@ -1227,8 +1236,8 @@ packages: resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} engines: {node: '>=4'} - minimatch@9.0.4: - resolution: {integrity: sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==} + minimatch@9.0.5: + resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} engines: {node: '>=16 || 14 >=14.17'} minimist-options@4.1.0: @@ -1408,6 +1417,10 @@ packages: psl@1.8.0: resolution: {integrity: sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==} + punycode.js@2.3.1: + resolution: {integrity: sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==} + engines: {node: '>=6'} + punycode@2.1.1: resolution: {integrity: sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==} engines: {node: '>=6'} @@ -1523,8 +1536,8 @@ packages: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} - shiki@0.14.7: - resolution: {integrity: sha512-dNPAPrxSc87ua2sKJ3H5dQ/6ZaY8RNnaAqK+t0eG7p0Soi2ydiqbGOTaZCqaYvA/uZYfS1LJnemt3Q+mSfcPCg==} + shiki@1.10.1: + resolution: {integrity: sha512-uafV7WCgN4YYrccH6yxpnps6k38sSTlFRrwc4jycWmhWxJIm9dPrk+XkY1hZ2t0I7jmacMNb15Lf2fspa/Y3lg==} side-channel@1.0.4: resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} @@ -1711,18 +1724,21 @@ packages: resolution: {integrity: sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==} engines: {node: '>= 0.4'} - typedoc@0.25.13: - resolution: {integrity: sha512-pQqiwiJ+Z4pigfOnnysObszLiU3mVLWAExSPf+Mu06G/qsc3wzbuM56SZQvONhHLncLUhYzOVkjFFpFfL5AzhQ==} - engines: {node: '>= 16'} + typedoc@0.26.3: + resolution: {integrity: sha512-6d2Sw9disvvpdk4K7VNjKr5/3hzijtfQVHRthhDqJgnhMHy1wQz4yPMJVKXElvnZhFr0nkzo+GzjXDTRV5yLpg==} + engines: {node: '>= 18'} hasBin: true peerDependencies: - typescript: 4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x + typescript: 4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x typescript@5.4.5: resolution: {integrity: sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==} engines: {node: '>=14.17'} hasBin: true + uc.micro@2.1.0: + resolution: {integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==} + ufo@1.5.3: resolution: {integrity: sha512-Y7HYmWaFwPUmkoQCUIAYpKqkOf+SbVj/2fJJZ4RJMCfZp0rTGwRbzQD+HghfnhKOjL9E01okqz+ncJskGYfBNw==} @@ -1797,12 +1813,6 @@ packages: jsdom: optional: true - vscode-oniguruma@1.7.0: - resolution: {integrity: sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==} - - vscode-textmate@8.0.0: - resolution: {integrity: sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==} - w3c-hr-time@1.0.2: resolution: {integrity: sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==} deprecated: Use your platform's native performance.now() and performance.timeOrigin. @@ -1906,6 +1916,11 @@ packages: yallist@2.1.2: resolution: {integrity: sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==} + yaml@2.4.5: + resolution: {integrity: sha512-aBx2bnqDzVOyNKfsysjA2ms5ZlnjSAW2eG3/L5G/CSujfjLJTJsEw1bGw8kCf04KodQWk1pxlGnZ56CRxiawmg==} + engines: {node: '>= 14'} + hasBin: true + yargs-parser@18.1.3: resolution: {integrity: sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==} engines: {node: '>=6'} @@ -2306,6 +2321,8 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.18.0': optional: true + '@shikijs/core@1.10.1': {} + '@sinclair/typebox@0.27.8': {} '@tootallnate/once@1.1.2': @@ -2386,8 +2403,6 @@ snapshots: ansi-regex@5.0.1: {} - ansi-sequence-parser@1.1.1: {} - ansi-styles@3.2.1: dependencies: color-convert: 1.9.3 @@ -2402,6 +2417,8 @@ snapshots: dependencies: sprintf-js: 1.0.3 + argparse@2.0.1: {} + array-buffer-byte-length@1.0.1: dependencies: call-bind: 1.0.7 @@ -2664,6 +2681,8 @@ snapshots: ansi-colors: 4.1.3 strip-ansi: 6.0.1 + entities@4.5.0: {} + error-ex@1.3.2: dependencies: is-arrayish: 0.2.1 @@ -3134,8 +3153,6 @@ snapshots: json-parse-even-better-errors@2.3.1: {} - jsonc-parser@3.2.1: {} - jsonfile@4.0.0: optionalDependencies: graceful-fs: 4.2.11 @@ -3152,6 +3169,10 @@ snapshots: lines-and-columns@1.2.4: {} + linkify-it@5.0.0: + dependencies: + uc.micro: 2.1.0 + load-yaml-file@0.2.0: dependencies: graceful-fs: 4.2.11 @@ -3196,7 +3217,16 @@ snapshots: map-obj@4.3.0: {} - marked@4.3.0: {} + markdown-it@14.1.0: + dependencies: + argparse: 2.0.1 + entities: 4.5.0 + linkify-it: 5.0.0 + mdurl: 2.0.0 + punycode.js: 2.3.1 + uc.micro: 2.1.0 + + mdurl@2.0.0: {} meow@6.1.1: dependencies: @@ -3233,7 +3263,7 @@ snapshots: min-indent@1.0.1: {} - minimatch@9.0.4: + minimatch@9.0.5: dependencies: brace-expansion: 2.0.1 @@ -3402,6 +3432,8 @@ snapshots: psl@1.8.0: optional: true + punycode.js@2.3.1: {} + punycode@2.1.1: optional: true @@ -3539,12 +3571,9 @@ snapshots: shebang-regex@3.0.0: {} - shiki@0.14.7: + shiki@1.10.1: dependencies: - ansi-sequence-parser: 1.1.1 - jsonc-parser: 3.2.1 - vscode-oniguruma: 1.7.0 - vscode-textmate: 8.0.0 + '@shikijs/core': 1.10.1 side-channel@1.0.4: dependencies: @@ -3744,16 +3773,19 @@ snapshots: is-typed-array: 1.1.13 possible-typed-array-names: 1.0.0 - typedoc@0.25.13(typescript@5.4.5): + typedoc@0.26.3(typescript@5.4.5): dependencies: lunr: 2.3.9 - marked: 4.3.0 - minimatch: 9.0.4 - shiki: 0.14.7 + markdown-it: 14.1.0 + minimatch: 9.0.5 + shiki: 1.10.1 typescript: 5.4.5 + yaml: 2.4.5 typescript@5.4.5: {} + uc.micro@2.1.0: {} + ufo@1.5.3: {} unbox-primitive@1.0.2: @@ -3832,10 +3864,6 @@ snapshots: - supports-color - terser - vscode-oniguruma@1.7.0: {} - - vscode-textmate@8.0.0: {} - w3c-hr-time@1.0.2: dependencies: browser-process-hrtime: 1.0.0 @@ -3944,6 +3972,8 @@ snapshots: yallist@2.1.2: {} + yaml@2.4.5: {} + yargs-parser@18.1.3: dependencies: camelcase: 5.3.1 diff --git a/src/plugin.ts b/src/plugin.ts index 56d03ac..b7adb46 100644 --- a/src/plugin.ts +++ b/src/plugin.ts @@ -93,10 +93,8 @@ export class MermaidPlugin { this.onConverterResolveBegin(context); }); - this.app.renderer.on({ - [PageEvent.END]: (event: PageEvent) => { - this.onEndPage(event); - }, + this.app.renderer.on(PageEvent.END, (event: PageEvent) => { + this.onEndPage(event); }); // high priority markdown parser to catch blocks before the built-in parser @@ -105,7 +103,6 @@ export class MermaidPlugin { (event: MarkdownEvent) => { this.onParseMarkdown(event); }, - this, 1000, ); } diff --git a/tsdoc.json b/tsdoc.json new file mode 100644 index 0000000..d419db2 --- /dev/null +++ b/tsdoc.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", + "tagDefinitions": [ + { + "tagName": "@mermaid", + "syntaxKind": "block" + } + ] +}